summaryrefslogtreecommitdiff
path: root/extools/README
blob: af91ce79c4efac94e06e85de0b23b3c2e925547c (plain)
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

Categories have the format i-j:CAT where i and j are the indices of the spaces
between words in the TARGET language.  For example, slash categories can be written:

  the blue house
  0-1:DT 1-2:JJ 2-3:NN 1-3:NBAR 0-2:NP/NN 0-3:NP


You may multiply label each span, e.g.

  NP
   |
 NBAR
   |
  NN
   |
 John
  0-1:NP 0-1:NBAR 0-1:NP

However, this may result in a very large number of rules being extracted.


****
* Filtering and Scoring of Unscored and Unfiltered Grammars
****

Take the unfiltered grammar, and a test set, and run:
./filter_grammar <test set> < unfiltered.grammar > filter.grammar

Then, to score the new filtered grammar, run:
./score_grammar <alignment> < filtered.grammar > scored.grammar