Reads a trained set of Brown clusters from a file in Percy Liang's format.
Reads a trained set of Brown clusters from a file in Percy Liang's format.
Each line of this file corresponds to a token, and has three tab-separated fields:
CLUSTER <tab> TOKEN <tab> COUNT
where CLUSTER is the bitstring representation of TOKEN's cluster, and COUNT is the token's count in the source corpus (from which the Brown clusters were trained)
name of file in Liang format
a BrownClusters object
Initializes a BrownClusters object from two maps, one that maps words to their Brown cluster (bitstring representation), another that maps words to their frequency in the source corpus (from which the Brown clusters were trained).
Initializes a BrownClusters object from two maps, one that maps words to their Brown cluster (bitstring representation), another that maps words to their frequency in the source corpus (from which the Brown clusters were trained).
maps words to the bitstring representation of their Brown cluster
maps words to their frequency in the source corpus
a BrownClusters object