Code Monkey home page Code Monkey logo

preprocess's Introduction

preprocess

Pipelines for preprocessing corpora.

Compile with bjam.

bin/text.sh $language $lower

does all the tokenization and normalization for normal text that has already been extracted and sentence split.

bin/gigaword_unwrap

takes Gigaword XML files on stdin and outputs text with P tags intended to be used as input to the sentence splitter. Also removes or normalizes many ad-hoc parenthesized expressions like (UNDERLINE) and consecutive duplicate lines.

bin/moses/ems/support/split-sentences.perl -l $language

is the Moses/Europarl sentence splitter with a bugfix to also split sentences separated by two spaces.

bin/resplit.sh $language

preserves existing line breaks and introduces additional breaks when multiple sentences appear in the same line. This is useful when you want to use the target side of parallel corpora for language modeling.

bin/gigaword_extract.sh $language

combines the unwrap and sentence split steps.

bin/dedupe

deduplicates text at the line level.

bin/remove_long_lines

removes lines longer than 2000 characters.

bin/select_latin

Removes lines that contain bad UTF8; contain control characters; have less than 90% Latin, Common, or Inherited characters (except angle brackets); or have less than 50% Latin characters. I used this for giga-fren.

bin/process_unicode -l $language [--flatten] [--normalize] [--lower]

Processes UTF8.

  • --lower lowercases
  • --normalize applies the ICU normalization function
  • --flatten applies a bunch of substitutions for punctuation
bin/heuristics.perl -l $language

A collection of substitution heuristics from various people.

bin/moses/tokenizer/tokenizer.perl -l $language

The Moses tokenizer.

preprocess's People

Contributors

kpu avatar vchahun avatar hieuhoang avatar graehl avatar

Watchers

Chagge 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.