lib-text A little text processing library

A little text processing library

Fork me on GitHub

This is lib-text, a little text processing library. It supports language identification, tokenization, stopword filtering and provides some useful helper functions. The tokenization has been tuned to work well with text conventions commonly used in social media such as Twitter, and supports URLs, emoji, hashtags, emails and @-mentions cleanly. Stopword filtering is currently supported for

  • German
  • English
  • Spanish
  • French
  • Indonesian
  • Japanese
  • Malay
  • Dutch
  • Portuguese
  • Swedish
  • Turkish

With more to come.


Add to your build.sbt file:

resolvers += "peoplepattern" at ""

libraryDependencies += "com.peoplepattern" %% "lib-text" % "0.3"


import com.peoplepattern.text.Implicits._

val txt = "Did you get your personalised print with your copy of #MadeintheAM on Black Friday? If not, there's still time!"

// Some(en)

// Vector(Did, you, get, your, personalised, print, with, your, copy, of, #MadeintheAM, on, Black, Friday, ?, If, not, ,, there's, still, time, !,

// Set(print, personalised, black, copy, friday, time)

// Set(print, personalised, black, #madeintheam, copy, friday, time)

// Set(black friday, personalised print)


Full API docs are available, for each published version:

Developed with ❤️ at People Pattern Corporation

People Pattern logo