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

Documentation issues

brentgracey opened this issue · comments

Hi - could you please check the below Readme extracts

val tagger = epic.models.deserialize[CRF[AnnotatedLabel, String]]("lib/epic-ner-en-conll_2.10-2014.6.3-SNAPSHOT.jar")
val segments = tagger(sentence)
println(tags.render(tagger.outsideLabel))

Gives a compile error "epic.sequences.CRF[epic.trees.AnnotatedLabel,String] does not take parameters"

I tried updating this slightly to the below,

val tagger = epic.models.deserialize[SemiCRF[AnnotatedLabel, String]](("lib/epic-ner-en-conll_2.10-2014.6.3-SNAPSHOT.jar"))

val sentenceSplitter = MLSentenceSegmenter.bundled().get
val tokenizer = new epic.preprocess.TreebankTokenizer()
val sentences: IndexedSeq[IndexedSeq[String]] = sentenceSplitter(input).map(tokenizer(_))

var result = ""

sentences.map{
  sentence =>

    val tags = tagger.bestSequence(sentence)
    result = tags.render(tagger.outsideSymbol)

}

result

Compiles and runs - but doesn't give very interesting output

Thanks,
Brent