Skip to main content

A Language Processing Utility

Project description

LPU

version python license

LPU is a collection of utility classes/functions for language processing

Installation

Installing from PyPI release

$ pip install --user lpu

Installing from GitHub master

$ pip install --user https://github.com/akivajp/lpu/archive/master.zip

Modules

modules in lpu package

lpu.common.config

inheritable and serializable configurutation classes, useful for calling functions with many arguments

lpu.common.environ

handling environment variables with stacks, useful for changing/reverting global settings, such as debugging modes

lpu.common.files

utility functions for file handling, including transparent file access of gzip files

lpu.common.logging

enhanced logging objects (from standard logging library) with colorizing features and operations with environment variables

lpu.common.progress

utility classes and functions for progress reporting (as known as progress bars), working with file-type objects and iterators

lpu.smt.align.ibm_models

utility classes to train and estimate word alignemt based on IBM models

Commands

LPU package also includes directly executable commands

commands in lpu package

lpu-abspath

  $ lpu-abspath [-h] filepath [filepath ...]

get absolute paths of given files or directories

lpu-clean-parallel

  $ lpu-clean-parallel [-h] [--min min_length] [--max max_length] \
      [--ratio ratio] [--target-directory directory_path] [--escape] \
      [--normalize] filepath [filepath ...] output_tag

lpu-dialog

  $ lpu-dialog [-h] [--exist filepath] [--continue] [--yes] [--no]

Show message on condition, wait and receive user's response

lpu-exec-parallel

  $ lpu-exec-parallel [-h] [--input filepath] [--output filepath] \
      [--splitsize num_lines] [--chunks num_files] [--threads num_threads] \
      [--tmpdir directory_path] [--verbose] [--interval seconds] command

Execute command in multiple processes by splitting the targe file

lpu-guess-langcode

  $ lpu-guess-langcode [-h] filepath [filepath ...]

Guess the language codes from given files

lpu-progress

  $ lpu-progress [-h] [--lines] [--refresh seconds] [--header string] \
      [filepath filepath ...]]

Show the progress of pipe I/O

lpu-random-split

  $ lpu-random-split [-h] --input filepath [filepath ...] \
      [--prefixes prefix [prefix ...]] [--suffixes suffix [suffix ...]] \
      --tags tag [tag ...] --split-sizes size [size ...] [--ignore-empty] \
      [--quiet] [--debug] [--random-seed seed] [--ids [suffix]]

lpu-wait-files

  $ lpu-wait-files [-h] [--quiet] [--debug] [--delay seconds] \
      [--interval seconds] [--timeout seconds] filepath [filepath ...]

Wait until file will be found

lpu-word-align-train

  $ lpu-word-align-train [-h] [--save-sores filepath] [--decode-align filepath] \
      [--iteration-limit num_iterations] [--threshold min_probability] \
      [--nbest integer] [--character] [--debug] [--quiet] \
      src_path trg_path save_trans_path [save_align_path]

lpu-word-align-score

  $ lpu-word-align-score [-h] [--save-scores filepath] \
      [--decode-align filepath] [--character] [--debug] [--quiet] \
      src_path trg_path trans_path [align_path]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lpu-0.2.2.tar.gz (2.1 MB view details)

Uploaded Source

File details

Details for the file lpu-0.2.2.tar.gz.

File metadata

  • Download URL: lpu-0.2.2.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.16

File hashes

Hashes for lpu-0.2.2.tar.gz
Algorithm Hash digest
SHA256 374b3804b4a33ea92aed8d24961cacc45d8a4a953456797705813f98c1c5f908
MD5 a7af09962bc108cbe659fe8276711814
BLAKE2b-256 12720dd06f01a2b3b7902c50653badd285c27606d22113cb53e8e2ff2d5fffed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page