Git Product home page Git Product logo

trainable-detokenizer's Introduction

trainable-detokenizer

Ondrej Bojar, [email protected]

A trainable detokenizer relying on NameTag.

Usage:

  file=tokenized-file
  cat $file \
  | ./output_to_detok_input.pl > $file.for-detok
  cat $file.for-detok \
  | ./nametag/src/run_ner --input=vertical --output=vertical \
      detokenization-model \
     > $file.decisions
  cat $file.for-detok \
  | ./interpret_detok_guesses.pl $file.decisions \
  > detokenized-file

The above procedure is conveniently wrapped in a script:

  ./detokenize.sh detokenization-model < tokenized-file > detokenized-file

Training (to detokenize obotokenizer):

The following will train a 3-stage recognition process, each trained for 30 iterations (these values are probably overkill). Other parameters were just copied from NameTag manual.

  cat heldout-tests \
  | ./obotokenizer --alphanumerics-eager --urls --sgml \
  > optional-heldout-set
  cat original-texts \
  | ./obotokenizer --alphanumerics-eager --urls --sgml \
  | ./training/obotok_to_detok_training_data.pl \
  | ./nametag/src/train_ner generic external \
      ./training/corp.feats \
      3 50 -0.2 0.1 0.01 0.5 0 \
      optional-heldout-set \
  > detokenization-model

Random Results

Some vaguely indicative numbers. They hugely depend on the tokenization scheme of the particular language and on the type of texts, so you should not really trust any comparison with them.

Language Training Sents Test Sents Baseline Training Acc Test Acc
Japanese 115k 5k 73% (drop space) 99% 95%

trainable-detokenizer's People

Contributors

obo avatar

Watchers

James Cloos 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.