Wikia / ask-fandom

Your semantic data-based assistant from Wikia
MIT License
7 stars 1 forks source link

Use spaCy rule-based matching to extract knowledge from articles content #23

Open macbre opened 5 years ago

macbre commented 5 years ago

https://spacy.io/usage/rule-based-matching#matcher

An example for Elmo article: https://explosion.ai/demos/matcher?text=Elmo%20is%20a%20furry%20red%20Muppet%20monster%20with%20an%20orange%20nose%20who%20lives%20on%20Sesame%20Street.%20He%20is%20self-described%20as%20three-and-a-half%20years%20old%2C%20and%20almost%20always%20refers%20to%20himself%20in%20the%20third%20person.%20The%20character%27s%20popularity%20led%20to%20his%20own%20segments%20on%20Sesame%20Street%20including%20%22Elmo%27s%20World%22%20and%20%22Elmo%20the%20Musical%22.%0A%0AElmo%20lives%20in%20an%20apartment%20on%20Sesame%20Street%20with%20his%20mother%20Mae%2C%20his%20father%20Louie%2C%20and%2C%20in%20some%20storybooks%2C%20a%20sister%20named%20Daisy.%20He%20has%20a%20pet%20goldfish%20named%20Dorothy.%0A%0AThe%20puppet%20that%20would%20eventually%20become%20Elmo%20was%20designed%20in%201979%20by%20Caroly%20Wilcox.%5B5%5D%5B6%5D%20Intended%20as%20a%20generic%20Anything%20Muppet%20monster%2C%20labels%20used%20for%20the%20puppet%20included%20%22baby%20monster%22%2C%20%22short%20red%22%20(in%20Wilcox%27s%20sketch)%2C%20and%20%22little%20red%22%20(on%20exhibit%20at%20Center%20for%20Puppetry%20Arts%2C%20Worlds%20of%20Puppetry%2C%20Jim%20Henson%20Collection).&model=en_core_web_sm&pattern=%5B%7B%22id%22%3A0%2C%22attrs%22%3A%5B%7B%22name%22%3A%22ORTH%22%2C%22value%22%3A%22Elmo%22%7D%5D%7D%2C%7B%22id%22%3A2%2C%22attrs%22%3A%5B%7B%22name%22%3A%22POS%22%2C%22value%22%3A%22VERB%22%7D%5D%7D%5D

macbre commented 5 years ago

https://gist.github.com/macbre/ef5186d987ab9305ce956a2a054adc3c#examples