spencermountain / compromise

modest natural-language processing
http://compromise.cool
MIT License
11.3k stars 645 forks source link

question: status of wikipedia plugin? #1116

Open sandro-pasquali opened 3 weeks ago

sandro-pasquali commented 3 weeks ago

I was looking at the wikipedia plugin: https://observablehq.com/@spencermountain/compromise-wikipedia

I can't seem to get it working, as it errors with Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/.../one.js' imported from '/.../node_modules/compromise-wikipedia/src/plugin.js'

I noticed this: https://github.com/spencermountain/compromise/blob/18db3dadcef0d87beabf71317d0904806355ec52/plugins/wikipedia/src/plugin.js#L1

It may be there is a different solution or other plugin I'm missing, but would love to parse out topics from text based on wikipedia topics.

Been enjoying wtf-wikipedia and thought I'd come at it from the opposite direction :)

Thanks!

spencermountain commented 3 weeks ago

whoa! ya that looks like a bug. Would love some help on this plugin, it was a bit of an experiment pushing the compressed wordlist into compromise and the browser.

will add a fix for this to the next upcoming release. thanks!

sandro-pasquali commented 3 weeks ago

Sure! I also noticed efrt (you have a skill in naming things) and that's interesting too. I'm not sure on your build process/dependency strategy but with this bug fix (where is the one.js?) I think it would be clearer to me how one,two,three, plugins, etc, are supposed to cooperate.

Thanks again.