Comments (7)
Python 2.7, no prerequisites.
from wikiextractor.
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.
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.
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.
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.
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.
You are welcome!
@attardi Beppe, you can close this one.
from wikiextractor.
Related Issues (20)
- Issues on newer (2023) and older (2019) dumps
- ptwiki-latest error HOT 2
- wikiextractor 3.0.6 not extracting HOT 3
- Why was --keep_tables removed?
- Never finishes and even debug gets stuck in a loop
- Warning: Template Errors HOT 1
- Is Windows supported
- Is Windows 10 supported? HOT 28
- Template errors in article HOT 2
- Add feature to extractPage to also dump the extracted page to json/csv/txt
- [Request for Help] Should I support a template file like `templates.txt` followed the arg `--templates`?
- Bullet points are missing in the final extracted text
- does not extract all wiki
- Parsing seems to exclude some part of the page
- Wikidata Extraction
- How to store a document in a separate txt file instead of a single txt file containing multiple documents
- ValueError: cannot find context for 'fork' & cannot pickle '_io.TextIOWrapper' object HOT 2
- pypi not updated with latest version (3.0.7)
- Get all revisions content
- OSS-Fuzz Integration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikiextractor.