1. yanchuan sim
  2. yc-pyutils


yanchuan sim  committed 80fa121

tweaked documentation

  • Participants
  • Parent commits 989d33f
  • Branches master

Comments (0)

Files changed (1)

File ycutils/corpus.py

View file
  • Ignore whitespace
   #end def
   def __iter__(self): 
-    """Returns an iterator for going through the corpus."""
+    """Returns an iterator for going through each word type in the vocabulary."""
     return self.__vocab.__iter__()
   def __contains__(self, w): 
     return len(self.__vocab)
   def iteritems(self):
-    """Returns a 4-tuple of `(word, frequency, document frequency, inverse document frequency)`."""
+    """Returns an iterator for a tuple of `(word, (frequency, document frequency, inverse document frequency))`."""
     return self.__vocab.iteritems()
   def find_token(self, token):