Prabin Bhandari commited on
Commit
e0ee438
1 Parent(s): d303927

Update counts

Browse files
Files changed (2) hide show
  1. cooccurrence_count.py +2 -1
  2. tests.py +1 -1
cooccurrence_count.py CHANGED
@@ -36,7 +36,8 @@ Args:
36
  `word1`: The first word.
37
  `word2`: The second word.
38
  Returns:
39
- count: The co-occurrence count of word1 and word2 in data.
 
40
  Examples:
41
  >>> data = ["hello sun","hello moon", "hello sun"]
42
  >>> c_count = evaluate.load("prb977/cooccurrence_count")
 
36
  `word1`: The first word.
37
  `word2`: The second word.
38
  Returns:
39
+ count: The count of total sentences.
40
+ co_occurrence_count: The co-occurrence count of word1 and word2 in data.
41
  Examples:
42
  >>> data = ["hello sun","hello moon", "hello sun"]
43
  >>> c_count = evaluate.load("prb977/cooccurrence_count")
tests.py CHANGED
@@ -3,6 +3,6 @@ test_cases = [
3
  "data": ["hello sun", "hello moon", "hello sun"],
4
  "word1": "hello",
5
  "word2": "sun",
6
- "result": {"count": 2}
7
  },
8
  ]
 
3
  "data": ["hello sun", "hello moon", "hello sun"],
4
  "word1": "hello",
5
  "word2": "sun",
6
+ "result": {"count": 3, "co_occurrence_count": 2}
7
  },
8
  ]