Spacy Pipeline Component for Hydrologic Entity Extraction
Project description
WATERWHEEL
WATERWHEEL (WATERloo Water and Hydrologic Entity Extractor and Linker) is a spaCy pipeline component that detects rivers, lakes, and other hydrologic entities, and links these entities to Wikidata. Although an acronym, we typically style the name as WaterWheel to avoid the impression that we're screaming all the time.
Simple Usage
WaterWheel is written as a spaCy module. Sample usage:
import spacy
from waterwheel import WaterWheel
nlp = spacy.load('en_core_web_sm')
nlp.add_pipe(WaterWheel(nlp))
doc = nlp('The ultimate source of the Mackenzie River is Thutade Lake.')
for ent in doc.ents:
print(f'{ent.text}, type: {ent.label_}, {ent._.wikilink} [{ent.start_char}, {ent.end_char}]')
# Results:
# Mackenzie River, type: RIVER, https://www.wikidata.org/wiki/Q3411 [27, 42]
# Thutade Lake, type: LAKE, https://www.wikidata.org/wiki/Q7333634 [46, 58]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
waterwheel-0.3.0.tar.gz
(1.9 MB
view hashes)
Built Distribution
Close
Hashes for waterwheel-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4f97f402f8b0c80b19038551f23e19d8b7efc57c301fa15a93a122fef63c57e |
|
MD5 | a4e78eb94f540be4b239a64636b7a914 |
|
BLAKE2b-256 | d84fee78b7f7919892d7fa979f1d75561da20f7734dbb6b3e769e083fdf92ca6 |