A idiomatic port of flashtext.py into Scala
Extract keywords
val keywordProcessor = KeywordProcessor()
keywordProcessor.addKeyWord("Scala")
keywordProcessor.addKeyWord("Java")
val actualResult = keywordProcessor.findKeywords("I like Scala and Java")
actualResult shouldBe Set("Scala", "Java")
Replace keywords
val keywordProcessor = KeywordProcessor()
keywordProcessor.addKeyWord("Scala", "Python")
keywordProcessor.addKeyWord("Java", "C++")
val actualResult = keywordProcessor.replaceKeywords("I like Scala and Java")
actualResult shouldBe "I like Python and C++"