Skip to main content
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 do not have a dictionary for MeCab, install unidic-lite.

$ pip install unidic-lite

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

<feature=XXX>

matches morphemes whose features are XXX

<feature=~XXX>

matches morphemes whose features maches a RegExp pattern 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.

Metadata

Release files for mrep 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mrep 0.2.0
File Size Uploaded Provenance
mrep-0.2.0.tar.gz 9.3 kB Without provenance Details

Release files / mrep-0.2.0.tar.gz

Download URL mrep-0.2.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
18afbfe2e9ca11c0b80f5e0a55e346187c3f9ca9d5250f3ec0d114a39e09a6d8
BLAKE2b-256 checksum
How to use checksums
e37792f96f89e0aa6eae318b32bf85ce327e23ef1e095c49541853d7c6d7fd5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.9

Security for mrep 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page