All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.allenai.nlpstack.tokenize.RemoteTokenizer.scala Maven / Gradle / Ivy

The newest version!
package org.allenai.nlpstack.tokenize

import org.allenai.nlpstack.core.Tokenizer
import org.allenai.nlpstack.core.remote.Remote

import scala.concurrent.ExecutionContext

class RemoteTokenizer(val urlString: String)(implicit executionContext: ExecutionContext)
    extends Tokenizer with Remote {
  def tokenize(sentence: String) = {
    val response = post(sentence)
    Tokenizer.multilineStringFormat.read(response)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy