Occurrence

class matchup.structure.occurrence.Occurrence(doc: str = '', term: matchup.presentation.text.Term = None)

Bases: object

Occurrence is an encapsulation of:
document name, keyword, frequency of term in document, positions and score

Occurrence is an data structure used to compose Vocabulary.

Attributes Summary

frequency Property that return the frequency of term i in document j
keyword Keyword property getter
score Property that return the score of this Occurrence

Methods Summary

add(*, position) Push this occurrence position in doc for the Occurrence structure
doc() Property that return the document name

Attributes Documentation

frequency
Property that return the frequency of term i in document j
Returns:document string name
keyword
Keyword property getter
Returns:Keyword name
score
Property that return the score of this Occurrence
Returns:Score of occurrence

Methods Documentation

add(*, position: str = None) → None
Push this occurrence position in doc for the Occurrence structure
Parameters:position – String that represents the position. Ex : ‘1-19’
Returns:None
doc() → str
Property that return the document name
Returns:document string name