GithubHelp home page GithubHelp logo

Parser Error about wikiextractor HOT 5 CLOSED

attardi avatar attardi commented on June 26, 2024
Parser Error

from wikiextractor.

Comments (5)

NoMoreFood avatar NoMoreFood commented on June 26, 2024

It appears sometime like this is enough to set it off:

<text>
#*: SomeText
# {{given name|female|from=English}}; SomeText
</text>

from wikiextractor.

attardi avatar attardi commented on June 26, 2024

The program is meant to work with the dump of the Wikipedia articles, not for Wiktionary.

from wikiextractor.

NoMoreFood avatar NoMoreFood commented on June 26, 2024

Fair enough. I thought all of Wikimedia uses the same markup -- reinforced by the fact that program is mentioned on the generic parser list that Wiktionary points to. If what I posted above would still be valid markup within a Wikipedia article (or you just want to improve error handling), it may be worth investigating. Thanks.

from wikiextractor.

attardi avatar attardi commented on June 26, 2024

Wiktionary uses the same markup, but different naming conventions. For example the titles of templates are capitalized in Wikipedia and not in Wiktionary.
Hence for example the template mechanism currently does not work.

BTW, I tried with the dump you mentioned, but I did not get the error you report.
I got many more pages from the dump also:

INFO: Preprocessed 4260000 pages
INFO: Starting processing pages from enwiktionary-latest-pages-articles.xml.bz2.
INFO: Using 2 CPUs.
INFO: 16 dictionary

Please download the latest version nof WikiExtractor and of Wiktionary and retry.
Delete your previous saved TEMPLATES, or they will be used instead of the new ones.

Don't expect much out of it though, for example the entry for 'dictionary' will just be this:

English.
Etymology.
, from , from , from , perfect past participle of + .

since no template gets expanded.

from wikiextractor.

NoMoreFood avatar NoMoreFood commented on June 26, 2024

Ok, I'll try tonight -- I might have been using a filtered page set when i was trying to narrow down what was going wrong. I should mention that I was trying to expand templates and the parser seemed at least run without error after stripping Unicode (might be another issue) and after replacing "^([#*]+){" with "\1 delete_me_later{" to address the aforementioned issue. More to come. Thanks for the help.

from wikiextractor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.