Skip to content

Commit

Permalink
Use mkFast on Grounder
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvacareanu committed Apr 29, 2024
1 parent 6bb84e2 commit 3b27cc0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import scala.io.Source
* a concept that is outside this)
*/
class ScalaGroundersAdapter(groundingConcepts: Seq[GroundingConcept]) extends Grounder {
lazy val grounder = SequentialGrounder()
lazy val concepts = groundingConcepts.map(fromConceptToDKG)
lazy val grounder = SequentialGrounder().mkFast(concepts)
def groundingCandidates(texts: Seq[String], k: Int): Seq[Seq[GroundingCandidate]] = {
val concepts = groundingConcepts.map(fromConceptToDKG)
texts.map { text =>
// TODO Maybe provide additional context (useful for NeuralGrounder)
grounder.ground(text, None, concepts, k)
Expand Down

0 comments on commit 3b27cc0

Please sign in to comment.