dlwh / epic

**Archived** Epic is a high performance statistical parser written in Scala, along with a framework for building complex structured prediction models.

Home Page:http://scalanlp.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to train CTB

yuanyunzhe opened this issue · comments

I tried to retrain the parser on CTB by converting original .fid files to .mrg files and adding the parameter --treebank.treebankType chinese, but it failed and here is the error message.

$ java -Xmx47g -cp path/to/assembly.jar epic.parser.models.NeuralParserTrainer --cache.path constraints.cache --opt.useStochastic -treebank.path path/to/ctb/ --treebank.treebankType chinese --evalOnTest --includeDevInTrain --trainer.modelFactory.annotator epic.trees.annotations.PipelineAnnotator --ann.0 epic.trees.annotations.FilterAnnotations --ann.1 epic.trees.annotations.ForgetHeadTag --ann.2 epic.trees.annotations.Markovize --ann.2.horizontal 0 --ann.2.vertical 0 --modelFactory epic.parser.models.PositionalNeuralModelFactory --threads 8
[main] INFO epic.parser.models.NeuralParserTrainer$ - Training Parser...
Exception in thread "main" java.lang.RuntimeException: error while indexingBinaryRule(@QP[^DP],QP[^QP],CC[^QP]) to BinaryRule(@QP,QP,CC)0
        at epic.parser.projections.ProjectionIndexer$$anonfun$apply$5.apply(ProjectionIndexer.scala:114)
        at epic.parser.projections.ProjectionIndexer$$anonfun$apply$5.apply(ProjectionIndexer.scala:110)
        at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
        at scala.collection.immutable.List.foreach(List.scala:381)
        at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
        at epic.parser.projections.ProjectionIndexer$.apply(ProjectionIndexer.scala:110)
        at epic.parser.projections.GrammarRefinements$.apply(GrammarRefinements.scala:177)
        at epic.parser.GenerativeParser$.annotated(GenerativeParser.scala:124)
        at epic.parser.GenerativeParser$.annotatedParser(GenerativeParser.scala:107)
        at epic.parser.models.NeuralParserTrainer$.trainParser(NeuralParserTrainer.scala:91)
        at epic.parser.models.NeuralParserTrainer$.trainParser(NeuralParserTrainer.scala:35)
        at epic.parser.ParserPipeline$class.trainParser(ParserPipeline.scala:92)
        at epic.parser.models.NeuralParserTrainer$.trainParser(NeuralParserTrainer.scala:35)
        at epic.parser.ParserPipeline$class.main(ParserPipeline.scala:107)
        at epic.parser.models.NeuralParserTrainer$.main(NeuralParserTrainer.scala:35)
        at epic.parser.models.NeuralParserTrainer.main(NeuralParserTrainer.scala)

So could you help me to find where the mistake is? Thanks a lot!