Skip to content

Commit

Permalink
small things
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaiSurdeanu committed Dec 27, 2023
1 parent 00f1a34 commit a57411a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ import org.clulab.scala_transformers.encoder.TokenClassifier

object TokenClassifierExampleApp extends App {
// Choose one of these.
val tokenClassifier = TokenClassifier.fromFiles("../models/microsoft_deberta_v3_base_mtl/avg_export")
val tokenClassifier = TokenClassifier.fromFiles("../microsoft-deberta-v3-base-mtl/avg_export")
// val tokenClassifier = TokenClassifier.fromResources("/org/clulab/scala_transformers/models/microsoft_deberta_v3_base_mtl/avg_export")
// val tokenClassifier = TokenClassifier.fromFiles("../models/google_electra_small_discriminator_mtl/avg_export")
// val tokenClassifier = TokenClassifier.fromResources("/org/clulab/scala_transformers/models/google_electra_small_discriminator_mtl/avg_export")
// val tokenClassifier = TokenClassifier.fromFiles("../models/roberta_base_mtl/avg_export")
// val tokenClassifier = TokenClassifier.fromResources("/org/clulab/scala_transformers/models/roberta_base_mtl/avg_export")

//val words = Seq("EU", "rejects", "German", "call", "to", "boycott", "British", "lamb", ".")
val words = Seq("John", "Doe", "went", "to", "China", ".")
//val words = Seq("John", "Doe", "went", "to", "China", ".")
//val words = Seq("John", "Doe", "went", "to", "China", ".")
val words = Seq("Ras1", "has", "phosphorylated", "Mek2", ".")

println(s"Words: ${words.mkString(", ")}")

println("The top label per token per task:")
Expand Down
2 changes: 1 addition & 1 deletion example.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

sbt "encoder/runMain org.clulab.scala_transformers.encoder.apps.TokenClassifierExampleApp"
sbt "apps/runMain org.clulab.scala_transformers.apps.TokenClassifierExampleApp"

0 comments on commit a57411a

Please sign in to comment.