Git Product home page Git Product logo

wikipedia-data-science's Introduction

wikipedia-data-science

Working with and analyzing Wikipedia Data

wikipedia-data-science's People

Contributors

willkoehrsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wikipedia-data-science's Issues

SAXParseException: <unknown>:2:0: syntax error

Hi @WillKoehrsen , I am trying to execute on the code in the notebook and ran into an error in the xml parser code. I am getting an SAX error at this code snippet. handler = WikiXmlHandler()

Parsing object

parser = xml.sax.make_parser()
parser.setContentHandler(handler)

Iteratively process file

#handler._pages

for l in lines[-165:-109]:
parser.feed(l)

The stack trace is as follows


ExpatError Traceback (most recent call last)
myprojectpath\lib\xml\sax\expatreader.py in feed(self, data, isFinal)
216 # except when invoked from close.
--> 217 self._parser.Parse(data, isFinal)
218 except expat.error as e:

ExpatError: syntax error: line 2, column 0

During handling of the above exception, another exception occurred:

SAXParseException Traceback (most recent call last)
in ()
40
41 for l in lines[-165:-109]:
---> 42 parser.feed(l)
43
44 print(handler._pages)

myprojectpath\lib\xml\sax\expatreader.py in feed(self, data, isFinal)
219 exc = SAXParseException(expat.ErrorString(e.code), e, self)
220 # FIXME: when to invoke error()?
--> 221 self._err_handler.fatalError(exc)
222
223 def _close_source(self):

myprojectpath\lib\xml\sax\handler.py in fatalError(self, exception)
36 def fatalError(self, exception):
37 "Handle a non-recoverable error."
---> 38 raise exception
39
40 def warning(self, exception):

SAXParseException: :2:0: syntax error

Appreciate your time in helping me proceed further and handling this issue. Thanks

It seems that the second parameter in get_file() is incorrect

Hi. When downloading the wiki dump through Keras's get_file(file, dump_url) in Downloading and Parsing Wikipedia Articles.ipynb, the second parameter should be dump_url+file instead of dump_url.
screen shot 2018-12-23 at 12 38 35 pm
And thanks for your work, which brings us convenience when dealing with the wiki dump.

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.