"City" (Text Content Type)
-
See Also
- TextCases
- TextPosition
- TextSentences
- Containing
- CityData
-
- Entity Types
- City
-
- Interpreter Types
- City
- ComputedCity
-
- Text Contents
- Location
- LocationEntity
- Country
- Neighborhood
- MetropolitanArea
- GeographicRegion
- AdministrativeDivision
- ZIPCode
- Related Guides
-
-
See Also
- TextCases
- TextPosition
- TextSentences
- Containing
- CityData
-
- Entity Types
- City
-
- Interpreter Types
- City
- ComputedCity
-
- Text Contents
- Location
- LocationEntity
- Country
- Neighborhood
- MetropolitanArea
- GeographicRegion
- AdministrativeDivision
- ZIPCode
- Related Guides
-
See Also
"City" (Text Content Type)
Text identified as the name of a city.
Details
- "City" can be used in TextCases, TextPosition and TextContents.
- "City" corresponds to any mention of a city (real or not real) in the context of the text.
- Homonyms of cities that are not cities should not be detected as "City" (if the context allows disambiguation).
- TextCases[…,"City""Interpretation"] attempts to return entities of type "City", as Interpreter["City"] does.
- Any specific "City" entity such as
can also be used as a content type in TextCases, TextPosition and TextContents.
Examples
Basic Examples (3)
Find occurrences of cities in a text:
TextCases["These cities are Washington, D.C., New York City, and Miami, Florida.", "City"]Get the result as a list of "City" entities:
TextCases["These cities are Washington, D.C., New York City, and Miami, Florida.", "City" -> "Interpretation", VerifyInterpretation -> True]A similar result can be obtained by applying Interpreter["City"] to text snippets:
Interpreter["City"][{"Washington, D.C.", "New York City", "Miami, Florida"}]Get properties about occurrences of cities:
TextContents["These cities are Washington, D.C., New York City, and Miami, Florida.", "City", All]Find mentions of Miami in a text:
TextContents["Meanwhile, the terrorists have secretly taken control of three airliners and have landed them on remote and desolate airfields that have been prepared in advance to off load and imprison the airliners' passengers and then quickly retrofit the planes to each transport and drop a nuclear bomb on three cities in the United States. These cities are Washington, D.C., New York City, and Miami, Florida.", Entity["City", {"Miami", "Florida", "UnitedStates"}]]See Also
TextCases TextPosition TextSentences Containing CityData
Entity Types: City
Interpreter Types: City ComputedCity
Text Contents: Location LocationEntity Country Neighborhood MetropolitanArea GeographicRegion AdministrativeDivision ZIPCode