Skip to content

mintutu/flashtext4s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlashText4s

Build Status codecov Codacy Badge

A idiomatic port of flashtext.py into Scala

Usage

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++"

About

A Scala Port of the Python package FlashText @ https://github.com/vi3k6i5/flashtext

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages