Skip to content

WATERloo Water and Hydrologic Entity Extractor and Linker

License

Notifications You must be signed in to change notification settings

gwf-uwaterloo/waterwheel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

PyPI: https://pypi.org/project/waterwheel/

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]

About

WATERloo Water and Hydrologic Entity Extractor and Linker

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages