Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Documentation issues #13

Open
brentgracey opened this issue Aug 20, 2014 · 0 comments
Open

Documentation issues #13

brentgracey opened this issue Aug 20, 2014 · 0 comments

Comments

@brentgracey
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant