lamossta commited on
Commit
0f3931a
·
1 Parent(s): 51620d3

deleted unused schema file

Browse files
Files changed (1) hide show
  1. src/schemas/data.py +0 -35
src/schemas/data.py DELETED
@@ -1,35 +0,0 @@
1
- from dataclasses import dataclass, field, fields
2
-
3
-
4
- @dataclass(frozen=True)
5
- class Position:
6
- """A single character span within a sample's text."""
7
-
8
- position_text: str = ""
9
- length: int = 0
10
- offset: int = 0
11
-
12
-
13
- @dataclass(frozen=True)
14
- class Entity:
15
- """A mention group for one entity within a sample."""
16
-
17
- entity_id: str = ""
18
- entity_text: str = ""
19
- entity_type: str = ""
20
- positions: list = field(default_factory=list)
21
- label: str = ""
22
-
23
-
24
- @dataclass(frozen=True)
25
- class Sample:
26
- """A single news article with its annotated entities."""
27
-
28
- id: str = ""
29
- text: str = ""
30
- entities: list = field(default_factory=list)
31
-
32
-
33
- def required_keys(cls) -> set[str]:
34
- """Return the set of required top-level keys for a data dataclass."""
35
- return {f.name for f in fields(cls)}