Commit
·
3b2dec7
1
Parent(s):
8434d40
rename field document_id to id
Browse files- conll2012_ontonotesv5.py +2 -2
conll2012_ontonotesv5.py
CHANGED
|
@@ -39,7 +39,7 @@ class Predicate(Span):
|
|
| 39 |
@dataclasses.dataclass
|
| 40 |
class Conll2012OntonotesV5Document(Document):
|
| 41 |
tokens: List[str]
|
| 42 |
-
|
| 43 |
pos_tags: List[str]
|
| 44 |
sentences: AnnotationList[Span] = annotation_field(target="tokens")
|
| 45 |
parse_trees: AnnotationList[Attribute] = annotation_field(target="sentences")
|
|
@@ -211,7 +211,7 @@ def example_to_document(
|
|
| 211 |
|
| 212 |
doc = Conll2012OntonotesV5Document(
|
| 213 |
tokens=tokens,
|
| 214 |
-
|
| 215 |
pos_tags=pos_tags,
|
| 216 |
)
|
| 217 |
# add the annotations to the document
|
|
|
|
| 39 |
@dataclasses.dataclass
|
| 40 |
class Conll2012OntonotesV5Document(Document):
|
| 41 |
tokens: List[str]
|
| 42 |
+
id: str
|
| 43 |
pos_tags: List[str]
|
| 44 |
sentences: AnnotationList[Span] = annotation_field(target="tokens")
|
| 45 |
parse_trees: AnnotationList[Attribute] = annotation_field(target="sentences")
|
|
|
|
| 211 |
|
| 212 |
doc = Conll2012OntonotesV5Document(
|
| 213 |
tokens=tokens,
|
| 214 |
+
id=example["document_id"],
|
| 215 |
pos_tags=pos_tags,
|
| 216 |
)
|
| 217 |
# add the annotations to the document
|