Git Product home page Git Product logo

multilingual_book_corpus's Introduction

Introduction

This corpus is useful for testing multilingual architectures. One can use a zero-shot setting and test one's architecture on such corpus.

Indeed, one can do the following:

  1. Train a model on English-only data using Harry Potter and The Republic books in English.
  2. Test a model on non-English data using Harry Potter's book translated to Russian.

Details on the corpus

  1. Harry Potter and the Goblet of Fire, J.K. Rowling - English version (full: 6,192 lines)
  2. The Republic, Plato - English version (full: 19,846 lines)
  3. Harry Potter and the Cursed Child, J.K. Rowling - Russian version (sample of 435 lines)

Preprocessing

One can remove manually the first introduction lines from The Republic, Plato.

We provide a bash file preprocessing data by lowercasing, removing accents and filtering short sentences. One can additionally preprocess data according to their needs.

Installing tools

Install Moses tools for preprocessing. We only used lowercasing and remove accent in practice but one can also tokenize with Moses tools using tokenize.sh in utils folder.

sh intall-tools.sh

Adapt preprocessing

We expect one parameter which is the minimum length MIN_LEGNTH. All sentences with a shorter estimated number of tokens than MIN_LENGTH are filtered out. By setting MIN_LENGTH to 0, one can keep the corpus without filtering short sentences.

sh prepare-data-book-corpus.sh MIN_LENGTH

The above will preprocess the corpus by:

  1. Lowercasing and removing accents and store that in data/processed e.g. harry-potter.tok.en
  2. Filtering out short sentences and store that in data/processed e.g. harry-potter_proc.tok.en

One can add additional steps as desired by modifying prepare-data-book-corpus.sh.

multilingual_book_corpus's People

Contributors

mastafaf avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.