Rpj
Rpj

Reputation: 6110

How to find if a word in a sentence is pointing to a city

How to find if a word in a sentence is pointing to a city

I live in San Francisco I work in San Jose I was born in New York

Is there a way to find that "San Francisco" is a city in the above sentence.

Upvotes: 1

Views: 741

Answers (1)

scozy
scozy

Reputation: 2582

The task of recognising possibly multi-word expressions that reference individuals of various specific types (locations, but also organisations, dates, etc.) is called named-entity recognition (NER).

For a simple task such as yours, existing freely available tools and models are sufficient. You could try the Stanford Named Entity Recognizer, which is free software. Try analysing your sentence using their online demo.

Upvotes: 1

Related Questions