Spaces:
Runtime error
Runtime error
Prabin Bhandari
commited on
Commit
·
8b1de7e
1
Parent(s):
b7d098a
Minor Changes
Browse files- cooccurrence_count.py +2 -1
cooccurrence_count.py
CHANGED
|
@@ -72,7 +72,6 @@ class CooccurrenceCount(evaluate.Measurement):
|
|
| 72 |
)
|
| 73 |
|
| 74 |
def _compute(self, data, word1, word2):
|
| 75 |
-
print(word1, word2)
|
| 76 |
len1 = len(word1.split(' '))
|
| 77 |
len2 = len(word2.split(' '))
|
| 78 |
if len1 > len2:
|
|
@@ -87,6 +86,8 @@ class CooccurrenceCount(evaluate.Measurement):
|
|
| 87 |
|
| 88 |
v = CountVectorizer(ngram_range=(lgram, ugram))
|
| 89 |
analyzer = v.build_analyzer()
|
|
|
|
|
|
|
| 90 |
vectorizer = CountVectorizer(
|
| 91 |
ngram_range=(lgram, ugram),
|
| 92 |
vocabulary={
|
|
|
|
| 72 |
)
|
| 73 |
|
| 74 |
def _compute(self, data, word1, word2):
|
|
|
|
| 75 |
len1 = len(word1.split(' '))
|
| 76 |
len2 = len(word2.split(' '))
|
| 77 |
if len1 > len2:
|
|
|
|
| 86 |
|
| 87 |
v = CountVectorizer(ngram_range=(lgram, ugram))
|
| 88 |
analyzer = v.build_analyzer()
|
| 89 |
+
print(analyzer(word1))
|
| 90 |
+
print(analyzer(word2))
|
| 91 |
vectorizer = CountVectorizer(
|
| 92 |
ngram_range=(lgram, ugram),
|
| 93 |
vocabulary={
|