• This repository has been archived on 08/Jul/2021
  • Stars
    star
    21
  • Rank 1,048,300 (Top 22 %)
  • Language
    Julia
  • License
    Other
  • Created over 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Julia binding of Japanese morphological analyzer MeCab

MeCab.jl

Build Status Coverage Status

Julia bindings for Japanese morphological analyzer MeCab

Usage

using MeCab

# Create MeCab tagger
mecab = Mecab()

# You can give MeCab option like "-o wakati"
# mecab = Mecab("-o wakati")

# Parse text
# It returns Array of MecabNode type
results = parse(mecab, "すももももももももものうち")

# Access each result.
# It returns Array of String
for result in results
  println(result.surface, ":", result.feature)
end

# Parse surface
results = parse_surface(mecab, "すももももももももものうち")

# Access each result
# It returns Array of Array of MecabNode
for result in results
  println(result)
end

# Parse nbest result
nbest_results = parse_nbest(mecab, 3, "すももももももももものうち")
for nbest_result in nbest_results
  for result in nbest_result
    println(result.surface, ":", result.feature)
  end
  println()
end

Requirement

  • mecab
  • dictionary for mecab (such as mecab-ipadic, mecab-naist-jdic, and so on)

If you don't install mecab and libmecab yet, MeCab.jl will install mecab, libmecab and mecab-ipadic that are confirmed to work with MeCab.jl under unix-like environment.

Note that by default, MeCab.jl will try to find system-installed libmecab (e.g. /usr/lib/libmecab.dylib). If you have already libmecab installed, this might cause library or dictionary incompatibility that MeCab.jl assumes. If you have any problem with system-installed ones, please try to ignore them and rebuild MeCab.jl by:

julia> ENV["MECABJL_LIBRARY_IGNORE_PATH"] = "/usr/lib:/usr/local/lib" # depends on your environment
julia> Pkg.build("MeCab")

The libmecab library path will be stored in MeCab.libmecab after loading MeCab.jl. The library path should look like for example:

julia> using MeCab
julia> MeCab.libmecab
"$your_home_dir_path/.julia/v0.4/MeCab/deps/usr/lib/libmecab.dylib"

Credits

MeCab.jl is created by Michiaki Ariga

Original MeCab is created by Taku Kudo

Contributors

More Repositories

1

tabula-py

Simple wrapper of tabula-java: extract table from PDF into pandas DataFrame
Python
2,061
star
2

julia-100-exercises

julia version of 100 numpy exercises
Jupyter Notebook
128
star
3

Mykytea-python

Python wrapper for KyTea
C++
36
star
4

notebooks

Jupyter Notebook
31
star
5

ml_in_production

Machine Learning infrastructure/architecture/operation for productionization
30
star
6

cloudera-parcel

customized cloudera-parcel
Python
13
star
7

sparkavro

Load Avro data into Spark with sparklyr
R
12
star
8

ibis-demo

Demo notebook of Ibis for "Spark + Python + Dita science Festival"
Jupyter Notebook
12
star
9

homebrew-cloudera

Homebrew Formulas for cloudera tools
Ruby
10
star
10

sparklyr-distribute

Example code of spark_apply with sparklyr for CDH
R
8
star
11

NLTK-pyspark

Example repository for NLTK execution on PySpark cluster with Cloudera Data Science Workbench
Python
8
star
12

spacyr-sparklyr

Example code of spacyr with sparklyr
R
8
star
13

tdworkflow

Unofficial Treasure Workflow Client
Python
7
star
14

cdsw-simple-serving-python

Python
7
star
15

Mykytea-ruby

Ruby wrapper for KyTea
C++
7
star
16

amazon-movie-review

Recommendation for Amazon movie review data
Python
6
star
17

pollynomial

AWS Polly wrapper for Ruby: Text to speech gem
Ruby
6
star
18

solar-power-prediction

Jupyter Notebook
5
star
19

hocon-validator

HOCON validator
Python
5
star
20

cJuman-installer

This is installer for cJuman which is wrapper of JUMAN.
C
5
star
21

cdsw-serve-docker

REST API server example with Docker for Cloudera Data Science Workbench
5
star
22

docker-sphinx-recommonmark

Sphinx documentation toolchain, including latex and recommonmark in an Ubuntu docker container.
Dockerfile
5
star
23

cloudera-sparklyr

Build script and Demo for Cloudera Director with Sparklyr
HTML
4
star
24

sparklytd

spaklyr plugin for td-spark to connect TD from R
R
4
star
25

digdaglog2sql

Extract SQLs from digdag log
Python
4
star
26

mecab-on-pyspark

Example code for distributing Python packages on Spark cluster
Python
3
star
27

implyr-example

Example repository of implyr
R
3
star
28

JPKyteaTokenizer

Japanese tokenizer with KyTea for nltk
Python
3
star
29

pficommon_json_test

pficommon::text::json test
C++
3
star
30

molehill

Hivemall SQLs and digdag workflows generator
Python
3
star
31

morph-websocket

Real time morphological analyzing web-app.
Ruby
2
star
32

cookiecutter-digdag

A template generates digdag workflows for SQL and Python
Python
2
star
33

audience_generator

Create dummy data for Audience Studio on Treasure Data
Python
2
star
34

homebrew-jumanpp

A Homebrew formula for juman++ http://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN++
Ruby
2
star
35

kytea_sinatra

Test application for KyTea with Sinatra
Ruby
2
star
36

JuliaTokyoTutorial

Julia Tokyo Tutorial
2
star
37

ml_intern2015

Cookpad summer intern 2015 exercise
Python
1
star
38

chezou-hugo

HTML
1
star
39

japan_weather

Python
1
star
40

mizuyarilink_octopress

CSS
1
star
41

prelims-cli

Python
1
star
42

ConfidenceWeighted.jl

confidence weighted classifier
Julia
1
star