-
Notifications
You must be signed in to change notification settings - Fork 962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some taken some given #202
Open
HjalmarrSv
wants to merge
110
commits into
attardi:master
Choose a base branch
from
HjalmarrSv:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Whether to add an empty line after header noLineAfterHeader = False,
## # Whether to preserve lists keepLists = False, ## # Whether to add an empty line after header noLineAfterHeader = False, ## # Whether to add aHeader and Footer headersfooters = False, ## # Whether to add aHeader and Footer spacefree = False, ## # Whether to add aHeader and Footer titlefree = False,
-- spacefree now also removes line = " " in addition to line = "". Both empty lines and one space lines are frequent in the output otherwise. Clean output afterwards with sed or similar tool of choice, but carefully - it will quickly do _exactly_ as told.
…k ) + magic word Although the code uses options.squeeze_blank for uniformity Added one magic word, 'pagelanguage', based on diff below @see https://doc.wikimedia.org/mediawiki-core/master/php/MagicWord_8php_source.html https://doc.wikimedia.org/mediawiki-core/master/php/MagicWordFactory_8php_source.html
both should work the same
as suggested by operator-name as: wants to merge 1 commit into attardi:master from operator-name:master
for debugging
removed doublette of '__TOC__', added: '__NOEDITSECTION__', #added 191229 '__EXPECTUNUSEDCATEGORY__', #added 191229 as found in private $mDoubleUnderscoreIDs here: https://doc.wikimedia.org/mediawiki-core/master/php/MagicWordFactory_8php_source.html
New option. One sentence per line. Nothing but article text. One empty line between articles. Some cleaning. Adapted from work by josecannete on wikiextractorforBERT here on github Also some small edits.
Use --min_text_length 100 for removing very short articles.
cat --squeeze-blank wiki/*/* > wiki/wiki.txt Notice the use of a wildcard on two levels, i.e. folders and files. Not possible usually.
Fix as proposed by chaojiang06: "Hi, I try to fix the template expansion function based on the current latest 2.75 version." "Basically, two lines got changed, #1269 and #1868." [not the same lines in this fork]
overcomplicated maybe could be just: if choice then exchange all . for ,
now, as in better late than never
with content within tags
Leftovers from templates, when guessing.
as supposed to.
at row 3528, if you want to rid output of '( )', whether empty or full of text.
as seen in json-output
if they are not already cleaned
https://stackoverflow.com/questions/12871066/what-exactly-is-a-raw-string-regex-and-how-can-you-use-it Using raw does nothing for re., but stops python from interpreting anything in the string before passing to re., as stated above.
may contain errors, testing needed
looks like there is a nested bug that needs to be hunted down also
Revision ID wrong attardi#203: attardi#203
if line 53 is changed to False. Note that if you want something else than ./ab/abcd/abcd as directory structure you need to change in the code. I have commented where (lines 117-119). Please, also look at line 247 for file name variations.
Either change from "/" to e.g. "\", or call the python os.path.join function once per directory level created. I have not tested either.
adapt to your needs
Slight improvement. Note sentences ends with . ! ?. Other punctuation marks have to be added, if they exist.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some ideas and fixes that may not suit everyone.