Skip to main content

MREP: morpheme regular expression printer

Project description

https://travis-ci.org/unnonouno/mrep.svg?branch=master https://coveralls.io/repos/unnonouno/mrep/badge.png?branch=master

MREP is a regular expression matcher for morpheme sequences. You can find morpheme sub-sequences that match a given pattern, such as noun sequences.

Requirement

Install

$ pip install mrep

If you want to install it from its source, use setup.py.

$ python setup.py install

Usage

usage: mrep [-h] [-o] [--color {never,auto,always}] [-n] [--mecab-arg MECAB_ARG]
            PATTERN [FILE [FILE ...]]
positional arguments:
PATTERN:

pattern

FILE:

data file

optional arguments:
-h, --help

show this help message and exit

-o, --only-matching

print only matching

--color COLOR

color mode. select from “never”, “auto” and “always”. (default: auto)

-n, --line-number

Show line number

--mecab-arg MECAB_ARG

argument to pass to mecab (ex: “-r /path/to/resource/file”)

Pattern

.

matches all morphemes

<surface=XXX>

matches morphemes whose surface are XXX

<pos=XXX>

matches morphemes whose POS are XXX

X*

matches repetiion of a pattern X

X|Y

matches X or Y

(X)

matches X

Example

<pos=名詞>

matches a noun

<pos=名詞>*

matches repetition of nouns

<pos=名詞>*<pos=助詞>

matches repetition of nouns and a particle

(<pos=名詞>|<pos=動詞>)*

matches repetition of nouns or verbs

License

This program is distributed under the MIT license.

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

mrep-0.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distributions

mrep-0.1.1.macosx-10.4-x86_64.tar.gz (8.6 kB view details)

Uploaded Source

mrep-0.1.1-py2.7.egg (11.0 kB view details)

Uploaded Source

File details

Details for the file mrep-0.1.1.tar.gz.

File metadata

  • Download URL: mrep-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mrep-0.1.1.tar.gz
Algorithm Hash digest
SHA256 22ed7791bf48049e7606af5692c5cc3a019f859c1173f14a0639b179425313cc
MD5 13657d39322876ec3d76836d82d8bfcb
BLAKE2b-256 b2266e3024e83b78bd6180e97fbd4cb44b69332e555bf6d9035fde150bf789d8

See more details on using hashes here.

File details

Details for the file mrep-0.1.1.macosx-10.4-x86_64.tar.gz.

File metadata

File hashes

Hashes for mrep-0.1.1.macosx-10.4-x86_64.tar.gz
Algorithm Hash digest
SHA256 ab15f67bb861907d8e8accef654aecdb95ee4a5224b9f59055531cb2f8050fc6
MD5 65eadc22b03032d7d360818d186b0425
BLAKE2b-256 5e20e1176bc9f635e79021649a7c5e0e76ba15273f08661459f5c4761907fc7c

See more details on using hashes here.

File details

Details for the file mrep-0.1.1-py2.7.egg.

File metadata

  • Download URL: mrep-0.1.1-py2.7.egg
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mrep-0.1.1-py2.7.egg
Algorithm Hash digest
SHA256 a47eb552c84ec4b8dd9be5edd7cc9e1fcdfb9a938badf12144666a7113a58d3e
MD5 d10b5b2bc5e5661f00cac8b6c337bcdb
BLAKE2b-256 381d0c0f2c4060a5b3054a5f74b83f6ab7422fb8401b350b9c8fb4f834f16883

See more details on using hashes here.

Supported by

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