Skip to content

Instantly share code, notes, and snippets.

@robhinds
Created November 6, 2016 21:29
Show Gist options
  • Select an option

  • Save robhinds/ec6a35e86f2809f5977746a701bdec3e to your computer and use it in GitHub Desktop.

Select an option

Save robhinds/ec6a35e86f2809f5977746a701bdec3e to your computer and use it in GitHub Desktop.
val model = new TokenNameFinderModel(modelIn)
val nameFinder = new NameFinderME(model)
val matches = nameFinder.find(sampleRecipe)
matches.foreach { m =>
sampleRecipe.slice(m.getStart, m.getEnd).foreach(println(_))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment