Skip to content

Pulls out locations for blocks of text so that content can be mapped geographically

Notifications You must be signed in to change notification settings

ttollers/penelope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Penelope

Penelope searchs through blocks of text and looks for locations so that content can be mapped.

penelope.getLocations(["Wandsworth"], ["Some content that talks about a place called Wandsworth"]);

Can be used with 50,000+ locations and large arrays of text.

The locations array should be inversely sorted according to string length. This means that, for example, Stratford Upon Avon will always match over Stratford where appropriate.

An array of locations can be sorted using:

penelope.orderLocationsByLength(array);

Penelope is a short term fix for more mature NLP solutions. It looks at words before and after the matched location to more accurately establish that it's not a persons name or road name or any other use the word may have.

About

Pulls out locations for blocks of text so that content can be mapped geographically

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published