Skip to content

Olaverse-Labs/text-processing-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Processing API

A fast API for sentiment analysis, lemmatization, POS tagging, chunking, and named entity recognition using FastAPI, spaCy, and TextBlob.

Setup

  1. Install dependencies:

    pip install -r requirements.txt
    python -m textblob.download_corpora
    python -m spacy download en_core_web_sm
  2. Run the API server:

    uvicorn main:app --reload

Endpoints

  • POST /sentiment — Sentiment analysis
  • POST /lemmatize — Lemmatization (stemming)
  • POST /pos_chunk — POS tagging and chunking
  • POST /phrase_ner — Phrase extraction and NER

Request body:

{
  "text": "Your text here."
}

Example: Language Detection

Request:

{
  "text": "Bonjour tout le monde!"
}

Response:

{
  "language": "fr"
}

Example: Tokenization

Request:

{
  "text": "Hello, world!"
}

Response:

{
  "tokens": ["Hello", ",", "world", "!"]
} 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors