Object

nlpdata.util

Text

Related Doc: package util

Permalink

object Text

Provides method(s) for rendering text from a list of tokens.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Text
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def normalizeToken(token: String): String

    Permalink

    Normalize a Penn Treebank token to its string representations.

  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. def render[A](input: A)(implicit arg0: HasTokens[A]): String

    Permalink

    Convenience method for rendering something that HasTokens directly to a string

  17. def render[F[_]](tokens: F[String])(implicit arg0: Foldable[F]): String

    Permalink

    Convenience method for rendering a sequence of PTB tokens directly to a string.

  18. def render[A, Result](input: A, spaceFromNextToken: (String) ⇒ Result, renderToken: (String) ⇒ Result)(implicit arg0: HasTokens[A], arg1: Monoid[Result]): Result

    Permalink

    Non-monadic convenience method for rendering anything that HasTokens

  19. def render[Word, F[_], M](words: F[Word], getToken: (Word) ⇒ String, spaceFromNextWord: (Word) ⇒ M, renderWord: (Word) ⇒ M)(implicit arg0: Foldable[F], arg1: Monoid[M]): M

    Permalink

    Non-monadic convenience method for renderM with tokens

  20. def renderAligned[A](input: A)(implicit arg0: HasAlignedTokens[A]): String

    Permalink
  21. def renderAligned[F[_]](alignedTokens: F[AlignedToken])(implicit arg0: Foldable[F]): String

    Permalink
  22. def renderAligned[A, Result](input: A, spaceFromSurroundingWords: (Option[AlignedToken], String, Option[AlignedToken]) ⇒ Result, renderOriginalToken: (String) ⇒ Result)(implicit arg0: HasAlignedTokens[A], arg1: Monoid[Result]): Result

    Permalink

    Non-monadic convenience method for rendering anything that HasAlignedTokens

  23. def renderAligned[Word, F[_], Result](words: F[Word], getAlignedToken: (Word) ⇒ AlignedToken, spaceFromSurroundingWords: (Option[Word], String, Option[Word]) ⇒ Result, renderWord: (Word) ⇒ Result)(implicit arg0: Foldable[F], arg1: Monoid[Result]): Result

    Permalink

    Non-monadic convenience method for renderM with aligned tokens

  24. def renderAlignedM[A, M[_], Result](input: A, spaceFromSurroundingWords: (Option[AlignedToken], String, Option[AlignedToken]) ⇒ M[Result], renderOriginalToken: (String) ⇒ M[Result])(implicit arg0: HasAlignedTokens[A], arg1: Monad[M], arg2: Monoid[Result]): M[Result]

    Permalink

    Monadic convenience method for rendering anything that HasAlignedTokens

  25. def renderAlignedM[Word, F[_], M[_], Result](words: F[Word], getAlignedToken: (Word) ⇒ AlignedToken, spaceFromSurroundingWords: (Option[Word], String, Option[Word]) ⇒ M[Result], renderWord: (Word) ⇒ M[Result])(implicit arg0: Foldable[F], arg1: Monad[M], arg2: Monoid[Result]): M[Result]

    Permalink

    Returns a correct rendering of aligned tokens that preserves their whitespace.

  26. def renderAlignedSpan[A](reference: A, span: Set[Int])(implicit arg0: HasAlignedTokens[A]): String

    Permalink
  27. def renderAlignedSpan[F[_]](reference: F[AlignedToken], span: Set[Int])(implicit arg0: Foldable[F]): String

    Permalink
  28. def renderM[A, M[_], Result](input: A, spaceFromNextToken: (String) ⇒ M[Result], renderToken: (String) ⇒ M[Result])(implicit arg0: HasTokens[A], arg1: Monad[M], arg2: Monoid[Result]): M[Result]

    Permalink

    Monadic convenience method for rendering anything that HasTokens

  29. def renderM[Word, F[_], M[_], Result](words: F[Word], getToken: (Word) ⇒ String, spaceFromNextWord: (Word) ⇒ M[Result], renderWord: (Word) ⇒ M[Result])(implicit arg0: Foldable[F], arg1: Monad[M], arg2: Monoid[Result]): M[Result]

    Permalink

    Returns a best-effort properly spaced representation of a sequence of tokens.

    Returns a best-effort properly spaced representation of a sequence of tokens. (Bear in mind you need to normalize PTB tokens yourself inside the renderWord parameter.) Allows you to specify how to render spaces and words so you can use this to create interactive DOM elements in JS. And it's monadic.

  30. def renderSpan[A](reference: A, span: Set[Int])(implicit arg0: HasTokens[A]): String

    Permalink

    Render a substring of a something that HasTokens

  31. def renderSpan[F[_]](reference: F[String], span: Set[Int])(implicit arg0: Foldable[F]): String

    Permalink

    Render a substring of a list of tokens

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped