Skip to content
Snippets Groups Projects
Commit 5ec5e42f authored by Michał Pogoda's avatar Michał Pogoda
Browse files

[WIP] Style optimizations

parent bf05a415
Branches
3 merge requests!10Anonimizer v2,!8Add txt output format,!7Better coverage
from dataclasses import dataclass
@dataclass
class Annotation:
def __hash__(self) -> int:
return (type(self), *(self.__dict__.values())).__hash__()
......@@ -6,8 +8,6 @@ class Annotation:
class MorphosyntacticAnnotation(Annotation):
def __init__(self, morphosyntactic_tag) -> None:
self.morphosyntactic_tag = morphosyntactic_tag
@dataclass
class NerAnnotation(Annotation):
def __init__(self, ner_type: str) -> None:
self.ner_type = ner_type
ner_type: str
\ No newline at end of file
from typing import Optional
from dataclasses import dataclass
@dataclass
class Detection:
TYPE_NAME = "detection"
def __init__(self) -> None:
pass
def __hash__(self) -> int:
return (type(self), *(self.__dict__.values())).__hash__()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment