forked from percyliang/brown-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
52 lines (37 loc) · 1.87 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Implementation of the Brown hierarchical word clustering algorithm.
Percy Liang
Release 1.3
2012.07.24
Input: a sequence of words separated by whitespcae (see input.txt for an example).
Output: for each word type, its cluster (see output.txt for an example).
In particular, each line is:
<cluster represented as a bit string> <word> <number of times word occurs in input>
Runs in $O(N C^2)$, where $N$ is the number of word types and $C$
is the number of clusters.
References:
Brown, et al.: Class-Based n-gram Models of Natural Language
http://acl.ldc.upenn.edu/J/J92/J92-4003.pdf
Liang: Semi-supervised learning for natural language processing
http://www.cs.berkeley.edu/~pliang/papers/meng-thesis.pdf
Compile:
make
Run:
# Clusters input.txt into 50 clusters (--max-ind-level controls amount of verbose output)
./wcluster --text input.txt --c 50 --max-ind-level 3
# Output in input-c50-p1.out/paths
============================================================
Change Log
1.3: compatibility updates for newer versions of g++ (courtesy of Chris Dyer).
1.2: make compatible with MacOS (replaced timespec with timeval and changed order of linking).
1.1: Removed deprecated operators so it works with GCC 4.3.
============================================================
(C) Copyright 2007-2012, Percy Liang
http://cs.stanford.edu/~pliang
Permission is granted for anyone to copy, use, or modify these programs and
accompanying documents for purposes of research or education, provided this
copyright notice is retained, and note is made of any changes that have been
made.
These programs and documents are distributed without any warranty, express or
implied. As the programs were written for research purposes only, they have
not been tested to the degree that would be advisable in any important
application. All use of these programs is entirely at the user's own risk.