A simple Named Entity Recognition (NER) application built using Spring Boot and Stanford CoreNLP, with a lightweight frontend for extracting entities like Person, City, Country, etc.
-
Extract named entities from text
-
Supports multiple entity types:
- 👤 Person
- 🏙 City
- 🌍 Country
- 📍 State/Province
- 🏷 Title
-
Smart input preprocessing (capitalization handling)
-
Clean and minimal frontend UI
-
REST API-based architecture
- Java
- Spring Boot
- Stanford CoreNLP
- HTML, CSS, JavaScript (Vanilla)
├── mvnw
├── mvnw.cmd
├── pom.xml
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── nlp/
│ │ │ └── NLP/
│ │ │ ├── NlpApplication.java
│ │ │ ├── controller/
│ │ │ │ └── NERController.java
│ │ │ ├── core/
│ │ │ │ └── Pipeline.java
│ │ │ └── model/
│ │ │ └── Type.java
│ │ └── resources/
│ │ └── application.properties
│ └── test/
│ └── java/
│ └── com/
│ └── nlp/
│ └── NLP/
│ └── NlpApplicationTests.java
└── .mvn/
└── wrapper/
└── maven-wrapper.properties
git clone https://github.com/Himanshux19/NaturalLanguageProcessing.git
cd NLPmvn clean install
mvn spring-boot:runBackend will start at:
http://localhost:8080
- Open
index.htmldirectly OR - Use Live Server (recommended)
type = PERSON | CITY | COUNTRY | STATE_OR_PROVINCE | EMAIL | TITLE
Plain text input
curl -X POST "http://localhost:8080/api/v1/ner?type=PERSON" \
-H "Content-Type: text/plain" \
-d "Elon Musk lives in USA"elon musk met tim cook in usa
Elon Musk Met Tim Cook In USA
Elon, Musk, Tim, Cook
-
Input text is received via REST API
-
Text is preprocessed (capitalization normalization)
-
Stanford CoreNLP pipeline performs:
- Tokenization
- POS tagging
- Named Entity Recognition
-
Entities are filtered based on selected type
-
Results are returned as a set
- Backend expects:
Content-Type: text/plain
- CORS is enabled for frontend:
http://localhost:63342
- Proper capitalization improves NER accuracy
- Highlight entities in UI
- Multi-entity detection (all types at once)
- Medical NLP integration (Apache cTAKES / BioBERT)
- True-casing using ML models
- Deployment (Render / AWS / Docker)
Himanshu Singh
- Stanford NLP Group
- Spring Boot Framework