Skip to content

πŸš€ Feature Request: Add FastAPI REST API Service for Vietnamese NLP ToolkitΒ #845

@khuynh22

Description

@khuynh22

Feature Description

A FastAPI-based REST API service to make Underthesea accessible for web applications, microservices, and non-Python developers.

Motivation

  • Enable language-agnostic access (JavaScript, Java, Go, etc.)
  • Support microservices architecture
  • No need to install Python package for every application

πŸ“‹ Proposed API Endpoints

  • POST /api/v1/tokenize/word - Word segmentation
  • POST /api/v1/tokenize/sentence - Sentence segmentation
  • POST /api/v1/pos-tag - POS tagging
  • POST /api/v1/ner - Named entity recognition
  • POST /api/v1/classify - Text classification
  • POST /api/v1/sentiment - Sentiment analysis
  • POST /api/v1/chunk - Chunking
  • POST /api/v1/dependency-parse - Dependency parsing
  • GET /api/v1/health - Health check

πŸ› οΈ Implementation

  • FastAPI with automatic OpenAPI documentation
  • Docker & Docker Compose for easy deployment
  • Pydantic for request/response validation
  • Full test coverage

🀝 Contribution

I have the code ready and can submit a PR if this is something the maintainers are interested in.

Would this feature align with the project's goals? I'm excited to contribute to this amazing Vietnamese NLP project!

Looking forward to your feedback!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions