Adding features to SCFG grammar files

36 views
Skip to first unread message

Ramtin Mehdizadeh Seraj

unread,
Dec 12, 2013, 4:28:55 PM12/12/13
to cdec-...@googlegroups.com
Hi, 
I have a question regarding adding features to SCFG files. I would be very pleased if you can help me with that.
I have extracted SCFG grammars for dev and test set. They are stored in standard format. 
Now, I am using another software to edit these files and adding features. 
For example for this rule 
[X] ||| [X,1] für [X,2] ||| [X,1] not [X,2] for ||| EgivenFCoherent=2.47712135315 SampleCountF=2.47856640816 CountEF=0.301030009985 MaxLexFgivenE=0.357576102018 MaxLexEgivenF=2.79468798637 IsSingletonF=0.0 IsSingletonFE=1.0 ||| 1-3

My software changed it to (by adding  NewFeature=1.0 ): 
[X] ||| [X,1] für [X,2] ||| [X,1] not [X,2] for ||| EgivenFCoherent=2.47712135315 SampleCountF=2.47856640816 CountEF=0.301030009985 MaxLexFgivenE=0.357576102018 MaxLexEgivenF=2.79468798637 IsSingletonF=0.0 IsSingletonFE=1.0 NewFeature=1.0 ||| 1-3

When I use Mira it does not consider any weight for this new feature. 

I see in the tutorial this sentence : 
You will need to add a weight for each feature you add to your weights file (discussed below) and then rerun MIRA.
I added initial weight to args of Mira. But it did not change the weight. 

Here is my Cdec.ini file :
formalism=scfg add_pass_through_rules=true feature_function=WordPenalty feature_function=KLanguageModel $DEMO_ROOT/nc.klm

Should I change the formalism? Is it possible to add feature by changing grammar files or it should be implemented as external feature function ?

Best, 
Ramtin
Reply all
Reply to author
Forward
0 new messages