- Notifications
You must be signed in to change notification settings - Fork2
Ahwar/NER-NLP-with-ONNX-Java
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A Natural Language Processing (NLP) Java application that detectsnames,organizations, andlocations in a text by running Hugging Face'sRoberta NER model usingONNX Runtime and theDeep Java Library.
Open the project folder in a Java IDE (recommended: IntelliJ IDEA Community) with Gradle support and build the project.
- Java Development Kit (JDK) version 17
- Gradle version 8.9
These files are required to run the project:
- ONNX model
tokenizer.jsonfile
To convert the Hugging Face NER model to ONNX, open thisGoogle Colaboratory Notebook, run the code as shown in the image below, and follow all the steps.
(The code for this purpose is also saved in the Jupyter notebook fileconvert Huggingface model to ONNX.ipynb. You can run the code usingJupyter Notebook.)
After running one of the above codes, your ONNX model will be saved in theonnx/ folder.
The tokenizer filetokenizer.json was taken from thisHugging Face repository. Download thetokenizer.json from thislink.
Move Files
Copy the files created from the above steps into theraw-files directory as shown in the image below.
Build the project using the button shown below.
Open theMain.java file and click the play button as shown in the red box in the image below.
About
A Java NLP application that identifies names, organizations, and locations in text by utilizing Hugging Face's RoBERTa NER model through the ONNX runtime and the Deep Java Library.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.



