Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

NotificationsYou must be signed in to change notification settings

Ahwar/NER-NLP-with-ONNX-Java

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.

Installation

Open the project folder in a Java IDE (recommended: IntelliJ IDEA Community) with Gradle support and build the project.

Requirements

  1. Java Development Kit (JDK) version 17
  2. Gradle version 8.9

Download Files

These files are required to run the project:

  1. ONNX model
  2. tokenizer.json file

Convert the ONNX Model

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.

run colab code cell

(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.

Download tokenizer.json

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.

raw-files path

Building the Project

Build the project using the button shown below.

how to build project

Run the Code

Open theMain.java file and click the play button as shown in the red box in the image below.

how to run project

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

Stars

Watchers

Forks

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp