Skip to content

ran-j/RanNLP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RanNLP

A simple NLP for .Net

The following functions are available:

Function Language Explanation
Singularize Portugese In development, not working perfectly
Pluralize Portugese In development, not working perfectly
WordTokenize All None
WordsLike All None
TransformText all None
RemoveEspecials all None
Levenshtein all None
Tokenize all None
Stem English ,Portugese None

Examples

Singularize

Turn words into singular (Very Unstable)

Private RanNLP As New NLP(Language.PT)
MsgBox(NLP.Singularize("abordagens"))
 'Return "abordagem"

Pluralize

Turn words into plural

Private RanNLP As New NLP(Language.PT)
MsgBox(NLP.Pluralize("casa"))
 'Return "casas"

Words Like

Check similarity of words and return a float with confidentiality

Private RanNLP As New NLP(Language.PT)
MsgBox(NLP.WordsLike("casa","casarão"))
 'Return 57.14286

Stem

Stem words

Private RanNLP As New NLP(Language.PT)
MsgBox(NLP.Stem("papelaria"))
 'Return "papel"

TransformText

TransformText text

Debug.Print(NLP.TransformText("Ola mundo", Transform.LowerCase))
Debug.Print(NLP.TransformText("Ola mundo", Transform.SentenceCase))
Debug.Print(NLP.TransformText("Ola mundo", Transform.TitleCase))
Debug.Print(NLP.TransformText("Ola mundo", Transform.UpperCase))
 'Returns 
    'ola mundo'
    'Ola mundo'
    'Ola Mundo'
    'OLA MUNDO'

RemoveEspecials

Debug.Print(NLP.RemoveEspecials("eleição"))
 'Return eleicao

Levenshtein

Private RanNLP As New NLP(Language.PT)

Dim LowerAllText As Boolean = True

Debug.Print(RanNLP.Levenshtein("casa", "Casarão"))
Debug.Print(RanNLP.Levenshtein("casa", "Casarão", LowerAllText))
'Returns 
    '4'
    '3'

Tokenize

Private RanNLP As New NLP(Language.PT) 

RanNLP.Tokenize("ola mundo todo. teste 3+3")

'Returns tokenize words ex
    'Token.Type: "Text"
    'Token.line': 0
    'Token.value': "ola"

Releases

No releases published

Packages

No packages published