ATEResults
Every extractor returns an ATEResults object.
ATEResults(corpus, terms, offsets=None)
Class to represent the results of term extraction.
All extractors return results in the same format:
termshas one entry per document,{"doc_id": ..., "terms": [{"term": ..., "score": ...}, ...]}, with the terms ranked from highest to lowest score.offsetsisNonefor plain-text input. For Teanga input, extractors that score the n-grams of each document give one entry per document,{"doc_id": ..., "offsets": [{"term": ..., "offset": (start, end)}, ...]}, listing every occurrence of each extracted term.
Initialize the ATEResults object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
corpus
|
Union[Corpus, List[str], List[Dict[str, str]]]
|
The corpus: a Teanga corpus, the input list of strings, or a list of dictionaries with |
required |
terms
|
List[Dict[str, Any]]
|
The extracted terms and their scores for each document. |
required |
offsets
|
Optional[List[Dict[str, Any]]]
|
The character offsets of each extracted term in each document, for Teanga corpora. |
None
|