cdec with t2s formalism

12 views
Skip to first unread message

eric baucom

unread,
Apr 13, 2015, 4:07:21 PM4/13/15
to cdec-...@googlegroups.com
Hello,

I'm working on some experiments with structure prediction over a syntactic simplification problem.  So far, I've been able to run cdec with the SCFG formalism with no problems.  However, I began running experiments with the t2s formalism and I run into some problems.  I used HyperGrex to extract the grammars, but when I try to run the cdec binary, it complains that the grammar is in an unexpected format.

In general, there is little documentation on the t2s formalism, on the cdec site, and on the HyperGrex site.  The cdec site (http://www.cdec-decoder.org/concepts/xrs.html) makes it sound like the only difference is to change the formalism in the cdec.ini to t2s. How else is running the t2s formalism different from the basic scfg tutorial (http://www.cdec-decoder.org/guide/tutorial.html)?  Is there any such tutorial for t2s online?

Pasting my grammar format and error messages below:

Sentence 1
(. .) ||| . ||| 0-0 ||| count=1.0 sent_count=1
(VP (VBN called) (S (NP (NNS eratosthenes)))) ||| word ||| 0-0 1-0 ||| count=1.0 sent_count=1
(RB first) ||| first ||| 0-0 ||| count=1.0 sent_count=1
(S (NP (DT the) (NN word)) (VP (VBD was) (ADVP [RB]) (VP (VBN used) (PP (IN by) (NP (NP (DT a) (NN scientist)) [VP])))) [.]) ||| a scientist called eratosthenes [1] used the [2] [3] ||| 1-0 1-1 2-1 3-4 4-2 4-3 4-5 8-7 9-8 ||| count=1.0 sent_count=1
Sentence 2
(NN theory) ||| theory ||| 0-0 ||| count=1.0 sent_count=1
(PP [IN] [NP]) ||| [1] [2] ||| 0-0 1-1 ||| count=1.0 sent_count=1
(. .) ||| . ||| 0-0 ||| count=1.0 sent_count=1
(IN in) ||| in ||| 0-0 ||| count=1.0 sent_count=1
(NP [NP] [PP]) ||| [1] [2] ||| 0-0 1-1 ||| count=1.0 sent_count=1
(IN as) ||| as ||| 0-0 ||| count=1.0 sent_count=1
(JJ first) ||| first ||| 0-0 ||| count=1.0 sent_count=1
[...]

with error:
cdec (c) 2009--2014 by Chris Dyer
Configuration file: passive/cdec.ini
feature: WordPenalty (no config parameters)
State is 0 bytes for feature WordPenalty
feature: KLanguageModel (with config parameters '/N/u/eabaucom/BigRed2/sent-simp/corpora/experiments/allwiki.klm')
Loaded 3-gram KLM from /N/u/eabaucom/BigRed2/sent-simp/corpora/experiments/allwiki.klm (MapSize=114493)
State is 98 bytes for feature KLanguageModel /N/u/eabaucom/BigRed2/sent-simp/corpora/experiments/allwiki.klm
Configured 1 rescoring pass
  [num_fn=2 int_alg=CUBE:k=200]
Expected at least 3 fields in rule file but line 1 is:
Sentence 1

So, I removed the "Sentence 1", "Sentence 2", etc. and then got this error:
cdec (c) 2009--2014 by Chris Dyer
Configuration file: passive/cdec.ini
feature: WordPenalty (no config parameters)
State is 0 bytes for feature WordPenalty
feature: KLanguageModel (with config parameters '/N/u/eabaucom/BigRed2/sent-simp/corpora/experiments/allwiki.klm')
Loaded 3-gram KLM from /N/u/eabaucom/BigRed2/sent-simp/corpora/experiments/allwiki.klm (MapSize=114493)
State is 98 bytes for feature KLanguageModel /N/u/eabaucom/BigRed2/sent-simp/corpora/experiments/allwiki.klm
Configured 1 rescoring pass
  [num_fn=2 int_alg=CUBE:k=200]
Grammar  line 1: unexpected input in alignment: c

Thanks,
Eric

Reply all
Reply to author
Forward
0 new messages