This algorithm calculates the relative distance between tokens within an n-gram. NOTE: this algorithm is only useful for dis-contiguous n-grams.
Some words that are textually identical but have different occurrences may be falsely suggested with a word farther away within the sentence.
This algorithm can be used to correct those false positives. Results range from 0 to 1.
Calculates the relative distance between positions. A score of 0 means the tokens are on opposite sides of the sentence. A score of 1 means they are next to each other.
length of sentence
first position
second position
Generated using TypeDoc
This algorithm calculates the relative distance between tokens within an n-gram. NOTE: this algorithm is only useful for dis-contiguous n-grams.
Some words that are textually identical but have different occurrences may be falsely suggested with a word farther away within the sentence.
This algorithm can be used to correct those false positives. Results range from 0 to 1.