ManikandanThangavelu / scikitcrf_NER

Python library for custom entity recognition using Sklearn CRF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Entity recognition using scikit CRF

Decscription

This is a simple python applicaion that uses sklearn-crfsuite for entity recognition using CRF.

Installation

Install this package using pip by running the follwing command

pip install scikitcrf_ner

if you face any issues while installing sklearn_crfsuite This may help

Make sure you download spacy english model using

python -m spacy download en

Usage

Import the package using

from scikitcrf_ner import entityRecognition

Train the model using

entityRecognition.train("path/to/trainingfile.json")

Refer the sample training file(sample_train.json), the training file should be json formatted Predict the entities by

entityRecognition.predict("Utterance")

Sample code

Refer this sample code:

from scikitcrf_ner import entityRecognition as ner
ner.train("sample_train.json")
entities = ner.predict("show me some Indian restaurants")
print(entites)

License

MIT

About

Python library for custom entity recognition using Sklearn CRF

License:MIT License


Languages

Language:Python 100.0%