def from_vocabfile(cls, filename):
    """ Construct a CountedVocabulary out of a vocabulary file.

    Note:
      File has the following format word1
                                    word2
    """
    words = [x.strip() for x in _open(filename, 'r').read().splitlines()]
    return cls(words=words)