Skip to content

Developed a negation-aware named entity recognition system in the product search context.

License

Notifications You must be signed in to change notification settings

StarrySkyrs/NegativeAwareNER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NegativeAwareNER

Developing a negation-aware named entity recognition system in the product search context

Steps to setup the project

  • Run command conda env update --file env.yaml --prune to download all the required dependencies
  • Create training set for NER model with command python code/TrainSet_Generator.py
  • Run the API server with uvicorn main:app --reload --app-dir=code/
  • Create knowledge base for product names by uploading the file using - http://127.0.0.1:8000/uploadfile/ endpoint

REQUEST:

curl -X 'POST' \
  'http://127.0.0.1:8000/extractInformation/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "message": "I want a blackk dress with no pink ribbons",
  "language": "English",
  "correct_spellings": true,
  "negationStyle": "tags"
}'

RESPONSE:

{
  "tokens": [
    "I",
    "want",
    "a",
    "black",
    "dress",
    "with",
    "no",
    "pink",
    "ribbons"
  ],
  "tags": [
    "O",
    "O",
    "O",
    "I-COLOUR",
    "I-ATTRIBUTE",
    "O",
    "O",
    "I-ATTRIBUTE",
    "I-ATTRIBUTE"
  ],
  "isNegative": [
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    true,
    true
  ]
}

About

Developed a negation-aware named entity recognition system in the product search context.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •