We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed12257 commit bcabc43Copy full SHA for bcabc43
1 file changed
chatterbot/components.py
@@ -29,6 +29,9 @@ def chatterbot_bigram_indexer(document):
29
token for token in document if not (token.is_punct)
30
]
31
32
+ # Pairs consist of the part-of-speech of the first token and the
33
+ # lemma of the second token in the bigram. This provides a good
34
+ # balance of generalization and specificity for matching.
35
bigram_pairs = [
36
f"{tokens[i - 1].pos_}:{tokens[i].lemma_.lower()}"
37
for i in range(1, len(tokens))
0 commit comments