Hotel Operations NER.
A two-stage language pipeline that converts free-form guest requests into structured item and location fields.
ENGINEERING DEEP DIVE
Inside the system.
Guest requests name items and locations in varied language. Structuring a request requires identifying the relevant phrases and matching them to a shared catalogue.
A trained spaCy pipeline extracts ITEM and LOCATION spans. SentenceTransformer embeddings then select the closest catalogue entries using cosine similarity. A typed FastAPI endpoint returns the extracted fields, matched terms, and scores.
Read src/inference.py and src/app.py for the extraction and API flow. The matching stage returns the closest catalogue entry and its similarity score, making the selection available for downstream review.
FROM THE REPOSITORY
What's inside.
- 01
Loads a trained spaCy pipeline to extract ITEM and LOCATION entities.
- 02
Maps extracted terms to a canonical catalogue through SentenceTransformer cosine similarity.
- 03
Exposes extraction and matching scores through a typed FastAPI endpoint.
These notes summarize the reviewed implementation and available artifacts. Open the original source for code, documentation, and subsequent changes.
Open the original repository