GithubHelp home page GithubHelp logo

giosal / wikidocsaligner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from motazsaad/wikidocsaligner

0.0 0.0 0.0 47 KB

Align Wikipedia articles based on interlang links

License: GNU General Public License v3.0

Python 100.00%

wikidocsaligner's Introduction

WikiDocsAligner: Wikipedia Documents Aligner

Align Wikipedia documents based on interlanguage links

Compatability

This code requires python 3.x

Installation

To use this tool, you must install requirements

pip install -r requirements.txt

or if Python alias is not setup on your system:

pip3 install -r requirements.txt

Usage example:

aligner.py

align wikipedia documents given that you have the sql of interlanugage links and document extracts

python aligner.py --src-lang en --target-lang ka --sql-file data/enwiki-latest-langlinks.sql --src-corpus data/enwiki --target-corpus data/kawiki --out-dir data/out/

or if Python alias is not setup on your system:

python3 aligner.py --src-lang en --target-lang ka --sql-file data/enwiki-latest-langlinks.sql --src-corpus data/enwiki --target-corpus data/kawiki --out-dir data/out/

Arguments

usage: aligner.py [-h] --src-lang SRC_LANG --target-lang TARGET_LANG
                  --sql-file SQL_FILE --src-corpus SRC_CORPUS --target-corpus
                  TARGET_CORPUS --out-dir OUT_DIR

Align Wikipedia documents based on interlanguage links .

optional arguments:
  -h, --help            show this help message and exit
  --src-lang SRC_LANG   source language. e.g., ar for Arabic, en for English,
                        or fr for French ...
  --target-lang TARGET_LANG
                        target language. e.g., ar for Arabic, en for English,
                        or fr for French ...
  --sql-file SQL_FILE   source language links sql file. Obtained from
                        https://dumps.wikimedia.org/
  --src-corpus SRC_CORPUS
                        source corpus directory.
  --target-corpus TARGET_CORPUS
                        target corpus directory.
  --out-dir OUT_DIR     the output directory.



corpus_info.py

to get information about the corpus (the most frequent words)

python corpus_info.py data/arz.wiki

Related projects

This project is used to extract Comparable Documents from Wikipedia

To cite this tool:

Motaz Saad and Basem Alijla (2017). WikiDocsAligner: an off-the-shelf Wikipedia Documents Alignment Tool. in The Second Palestinian International Conference on Information and Communication Technology (PICICT 2017).

How to contribute

Your contributions to improve the code are welcomed. Please follow the steps below.

  1. Fork the project.
  2. Modify the code, test it, make sure that it works fine.
  3. Make a pull request.

Please consult github help to get help.

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.