oakx_spacy package
Submodules
oakx_spacy.cli module
Command line interface for oakx-spacy.
oakx_spacy.spacy_implementation module
Spacy Implementation.
- class oakx_spacy.spacy_implementation.SpacyImplementation(resource=None, strict=False, multilingual=None, preferred_language=<factory>, autosave=<factory>, exclude_owl_top_and_bottom=<factory>, ontology_metamodel_mapper=None, _converter=None, **_kwargs)
Bases:
TextAnnotatorInterface
,OboGraphInterface
Spacy Implementation.
- annotate_file(text_file, configuration)
Annotate text from a file.
- Parameters
text – Text to be annotated.
configuration (
TextAnnotationConfiguration
) – TextAnnotationConfiguration , defaults to None
- Yield
Annotated result
- Return type
Iterable
[TextAnnotation
]
- annotate_text(text, configuration)
Annotate text from a file.
- Parameters
text (
str
) – Text to be annotated.configuration (
TextAnnotationConfiguration
) – TextAnnotationConfiguration , defaults to None
- Yield
Annotated result
- Return type
Iterable
[TextAnnotation
]
- write_output(output_dict, fieldnames, info)
Generate dictionary representation of the output which is exported as TSV.
- Parameters
output_dict (
dict
) – Dictionary to be exported.fieldnames (
list
[str
]) – column names.info (
dict
) – Dictionary containing extra information.
Module contents
oakx_spacy package.