Code Monkey home page Code Monkey logo

Comments (7)

attardi avatar attardi commented on June 23, 2024

Python 2.7, no prerequisites.

from wikiextractor.

nathj07 avatar nathj07 commented on June 23, 2024

Ok, that's what I have here - Python 2.7. So, any ideas on the syntax issue here?

Thanks for the quick response

from wikiextractor.

kloppjp avatar kloppjp commented on June 23, 2024

Could you replace the line in question with

afterPat = dict()
for o,c in izip(openDelim, closeDelim):
    afterPat[o] = re.compile(openPat + '|' + c, re.DOTALL)

This basically omits the short cut notation of the for loop. Furthermore, do you use any python Environment (e.g. Anaconda)? If that's the case then please try executing the script via python ./Wikiextractor.py -h as otherwise it is defaulting to the system's python interpreter in /usr/bin.

from wikiextractor.

nathj07 avatar nathj07 commented on June 23, 2024

Thank you for the quick response. Running it with python WikiExtractor.py appears to be working.

As for the code change do you want me to make that and issue a pull req or was that just for me to get up and running? Thanks

from wikiextractor.

kloppjp avatar kloppjp commented on June 23, 2024

The code change was just to get you beyond that error. As this project requires python 2.7, such syntax ought to be supported (and it would've to be changed in several other places as well, in fact).
I suggest that this solves your problem? For a final check you could call /usr/bin/python and see what version caused the syntax error.

from wikiextractor.

nathj07 avatar nathj07 commented on June 23, 2024
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information

Thanks again for the help. I'll get round to cleaning up my environments etc.

from wikiextractor.

kloppjp avatar kloppjp commented on June 23, 2024

You are welcome!
@attardi Beppe, you can close this one.

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.