Sign inSign up

navdeepsharma/dictionary-annotator

By navdeepsharma

•Updated almost 7 years ago

Image
0

305

navdeepsharma/dictionary-annotator repository overview

Prepare the lexicons CSV file in the following format.

id,name,lexicon
female,female,gender
female,she,gender
female,women,gender
female,woman,gender
male,man,gender
male,men,gender
male,gentleman,gender
male,he,gender

Run the container by mounting the lexicons directory.

docker run -d -p 8080:8080 -p 8983:8983 -v <lexicons_dir>:/models/soda/dictionary --name dictionary-annotator navdeepsharma/dictionary-annotator:latest

Once the container is running make POST request with the following format:
URL - http://localhost:8080/annotate
Request Body -
{ "lexicon":"gender", "matching":"fuzzy", "content":"This is a test content to find a womon", "fuzziness":1 }
Response Body -

"statusCode": 200, "message": "Request processed successfully.", "sodaAnntations": [ { "coveredText": "womon", "matchedText": "woman", "id": "female", "lexicon": "gender", "begin": 33, "end": 38, "confidence": "0.8" } ] }

Possible matching parameters: exact, fuzzy, lower, stem, punct, sort

Tag summary

Content type

Image

Digest

Size

913.9 MB

Last updated

almost 7 years ago

docker pull navdeepsharma/dictionary-annotator