Skip to content
Snippets Groups Projects
Commit dda494cd authored by Renaud's avatar Renaud
Browse files

Mise à jour licence

parent d1ba9533
No related branches found
No related tags found
No related merge requests found
MIT License
Copyright (c) 2023 BIRK Renaud
Copyright (c) 2023 ALAPETITE Nino, AOUAD Mohamed Jad, ARIFA Mohamed Salim, BERRADA Rania, BIRK Renaud, BRETÉCHÉ Youenn, CHEUCLE Antoine, GOLDET Frantz, LAVENAN Kilian, LEFEVRE Antoine, PARION Arnaud, RABIER Nathan, WASSEL Jemli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -9,6 +9,6 @@ __all__ = [
from ._db import DB
from ._identification import Identification
from ._models import *
from ._models import Dispositif, Group
from ._ocr import OCR
from ._ui import UI
......@@ -51,7 +51,7 @@ class Identification:
def estPasUtile(self, groupe):
return self.estMarqueur(groupe.split(" ", 1)[0], "lot") or self.estCodeBarre(groupe) or self.estDate(groupe)
def identify(self):
def identify(self) -> Tuple[Dispositif, List]:
"""
Prend la liste de texte et retourne un dispositif contenant les données déterminées et les données à classer par l'utilisateur
"""
......@@ -75,4 +75,4 @@ class Identification:
if not self.estPasUtile(subgroup.string):
self.dispositif.addATrier(subgroup.string)
res_subgroups.append(subgroup)
return self.dispositif, res_subgroups
return (self.dispositif, res_subgroups)
......@@ -3,8 +3,6 @@ from typing import List, Tuple
class Group:
"""
Classe représentant un regroupement (boîte, chaîne de caractères, score)
@author: Groupe 7
"""
def __init__(self, box: List[List[float]], string: str, score: float) -> None:
self.box = box
......@@ -16,13 +14,13 @@ class Dispositif:
Classe représentant les informations d'identification d'un dispositif
"""
def __init__(self):
self.fabricant = ""
self.marque = ""
self.description = ""
self.iud = ""
self.ref = ""
self.aTrier = []
def __init__(self, fabricant="", marque="", description="", iud="", ref="", groups=""):
self.fabricant = fabricant
self.marque = marque
self.description = description
self.iud = iud
self.ref = ref
self.groups = list()
def setFabricant(self, fabricant):
self.fabricant = fabricant
......
......@@ -6,8 +6,6 @@ from typing import List
class OCR:
"""
Classe d'implémentation de la reconnaissance optique de caractères (OCR)
@author: Groupe 7
"""
def __init__(self, use_gpu=True) -> None:
# Il n'y a besoin d'exécuter une seule fois pour télécharger et charger
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment