forked from danieldk/citar-cxx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
65 lines (45 loc) · 2.08 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
53
54
55
56
57
58
59
60
61
62
63
64
65
Citar - A simple Trigram HMM part-of-speech tagger
== Introduction ==
Citar is a simple part-of-speech tagger, based on a trigram Hidden
Markov Model (HMM). It (partly) implements the ideas set forth in
[1]. Citar is written in C++.
Citar is licensed under the GNU Lesser General Public License
version 3.0.
== Warning ==
The Citar API will be highly unstable for the first few versions!
== Building Citar ==
Builing Citar requires a C++ standard library with TR1 extensions,
such as a recent version of libstdc++ as included with GNU g++. This
release was tested with g++ 4.3.2. cmake is used for creating build
infrastructure.
You can create the build infrastructure by running "ccmake ." in the
top-level Citar directory. This will allow you to configure various
settings. The WITH_TRIGRAM_CACHE setting is used to enable/disable the
trigram cache for linear interpolation smoothing. This may give a
performance gain in some situations, but is currently not thread-safe.
After configuring Citar with cmake you can invoke "make" on Unix
systems to build Citar. Command-line utilities for training and
evaluating the tagger will be produced. Compilation will also produce
the 'libsitar.a' library, which you can use to integrate the tagger in
your own programs.
== Training ==
The language model and lexicon can be created with the 'train' utility:
---
$ ./train corpus-train lexicon ngrams
---
This will create the 'lexicon' and 'ngrams' files. The trainer will read
corpora in the Brown format (one sentence per line, words and tags are
separated with a forward slash). You can now test the tagger with the
command-line 'tag' utility, which reads tokenized sentences from the
standard input and prints the most probable tag sequence:
---
$ echo "The cat is on the mat ." | ./tag lexicon ngrams
The/AT cat/NN is/BEZ on/IN the/AT mat/NN ./.
---
== Authors ==
Daniel de Kok <[email protected]>
== FAQ ==
- "What's up with the name?"
Citar, it is not an abbreviation. If you do prefer abbreviations,
let's make it "C++ sImple TAgging Redux" :).
[1] TnT - a statistical part-of-speech tagger, Thorsten Brants, 2000