How asynccoder-10/spacy_hugging-face works
This repository is an educational NLP project whose final product is a FastAPI text-analysis API. Its principal workflow accepts text, runs sentiment classification and—on the combined endpoint—spaCy entity recognition, then returns validated structured results. Separate curriculum scripts demonstrate tokenization, syntax analysis, custom NER rules, and Hugging Face model loading. The API implementation is sampled; curriculum capabilities are represented from their source excerpts. API model inference runs locally through libraries, not as a remote inference service.
Main entry points: main.py Full Analysis Endpoint · tokenizer_task.py Tokenization Demo · custom_tokenizer.py Custom Tokenizer · advance_tokenizer.py Regex Tokenizer
Components 17
REST API
- FastAPI App
mini-project/main.py - Request Schema
mini-project/main.py - Sentiment Endpoint
mini-project/main.py - Full Analysis Endpoint
mini-project/main.py - Response Schemas
mini-project/main.py
API NLP Inference
- Sentiment Classifier
mini-project/main.py - Entity Recognition
mini-project/main.py
NLP Curriculum
- Tokenization Demo
tokenizer_task.py - Custom Tokenizer
custom_tokenizer.py - Regex Tokenizer
advance_tokenizer.py - Syntax Analysis
syntax_task.py - NER Demo
ner_task.py - Custom NER Rules
custom_ner_rules.py - spaCy Verification
verify_spacy.py
Model Exploration
- Transformer Sentiment Demo
sentiment_task.py - Hub Model Loading
huggingface_task.py
Other components
- API Client
Connections 19
- API Client → FastAPI App: sends requests
README.md - FastAPI App → Sentiment Endpoint: routes to
mini-project/main.py - FastAPI App → Full Analysis Endpoint: routes to
mini-project/main.py - Sentiment Endpoint → Request Schema: accepts
mini-project/main.py - Full Analysis Endpoint → Request Schema: accepts
mini-project/main.py - Sentiment Endpoint → Sentiment Classifier: classifies text
mini-project/main.py - Full Analysis Endpoint → Sentiment Classifier: classifies text
mini-project/main.py - Full Analysis Endpoint → Entity Recognition: extracts entities
mini-project/main.py - Sentiment Endpoint → Response Schemas: returns prediction
mini-project/main.py - Full Analysis Endpoint → Response Schemas: returns analysis
mini-project/main.py - Tokenization Demo → Tokenization Demo: segments sentences
tokenizer_task.py - Syntax Analysis → Syntax Analysis: parses syntax
syntax_task.py - NER Demo → NER Demo: extracts entities
ner_task.py - Custom NER Rules → Custom NER Rules: applies patterns
custom_ner_rules.py - Custom Tokenizer → Custom Tokenizer: customizes rules
custom_tokenizer.py - Regex Tokenizer → Regex Tokenizer: splits text
advance_tokenizer.py - spaCy Verification → spaCy Verification: checks pipeline
verify_spacy.py - Transformer Sentiment Demo → Transformer Sentiment Demo: runs classifiers
sentiment_task.py - Hub Model Loading → Hub Model Loading: loads pretrained model
huggingface_task.py