-
-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
68c18d7
commit 9268e12
Showing
1 changed file
with
17 additions
and
12 deletions.
There are no files selected for viewing
29 changes: 17 additions & 12 deletions
29
datasets/UD_Vietnamese-COL/dictionary/DEVELOPER_GUIDES.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
# Developer Guides | ||
|
||
Step 1: Download wikipedia dump | ||
Step 1: Download Wikipedia dump | ||
|
||
``` | ||
export TS=20210720 | ||
mkdir -p ~/.underthesea/data/viwiki-$TS | ||
cd ~/.underthesea/data/viwiki-TS | ||
wget https://dumps.wikimedia.org/viwiki/20210820/viwiki-20210820-pages-articles.xml.bz2 | ||
cd ~/.underthesea/data/viwiki-$TS | ||
wget https://dumps.wikimedia.org/viwiki/$TS/viwiki-$TS-pages-articles.xml.bz2 | ||
wget https://raw.githubusercontent.com/NTT123/viwik18/master/WikiExtractor.py | ||
bzip2 -d viwiki-20210820-pages-articles.xml.bz2 | ||
python WikiExtractor.py -s --lists viwiki-20210820-pages-articles.xml -q -o - | perl -CSAD -Mutf8 cleaner.pl > viwik18.txt | ||
bzip2 -d viwiki-$TS-pages-articles.xml.bz2 | ||
python WikiExtractor.py --no-templates -b 10M -s --lists viwiki-$TS-pages-articles.xml | ||
``` | ||
|
||
Step 2: Run | ||
Step 2: Clean data | ||
|
||
``` | ||
python utils/col_wiki_clean.py | ||
python utils/col_wiki_ud.py | ||
python underthesea/utils/col_wiki_clean.py | ||
python underthesea/utils/col_wiki_ud.py | ||
``` | ||
|
||
Step 3: Run | ||
Step 3: Run | ||
|
||
``` | ||
python utils/col_dictionary.py | ||
python utils/col_dictionary_import.py | ||
``` | ||
python underthesea/utils/col_dictionary.py | ||
python underthesea/utils/col_dictionary_import.py | ||
``` | ||
For Mac OS >= Mojave, alternatively run | ||
``` | ||
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES python underthesea/utils/col_dictionary.py | ||
python underthesea/utils/col_dictionary_import.py | ||
``` |