Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lempiji/bindbc-mecab
https://github.com/lempiji/bindbc-mecab
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lempiji/bindbc-mecab
- Owner: lempiji
- Created: 2020-07-24T10:09:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-24T10:15:06.000Z (over 4 years ago)
- Last Synced: 2024-06-21T18:11:16.897Z (5 months ago)
- Language: D
- Size: 992 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-d - bindbc-mecab - bindbc MeCab binding (Part-of-Speech and Morphological Analyzer for Japanese) (Scientific / Language Processing)
README
# bindbc-mecab
This project provides dynamic and static bindings to the C API of [MeCab](http://taku910.github.io/mecab/). The bindings are `@nogc` and `nothrow` compatible and can be compiled for compatibility with `-betterC`.## Usage
By default, `bindbc-mecab` is configured to compile as a dynamic binding that is not `-betterC` compatible. The dynamic binding has no link-time dependency on the library, so the shared library must be manually loaded at runtime.To use MeCab, add `bindbc-mecab` as a dependency to your project's package config file. For example, the following is configured to use MeCab as a dynamic binding that is not `-betterC` compatible:
__dub.json__
```
"dependencies": {
"bindbc-mecab": "~>1.0.0",
}
```__dub.sdl__
```
dependency "bindbc-mecab" version="~>1.0.0"
```### Load Library
```
const support = loadMeCab();
if (support != MeCabSupport.mecab)
{
writeln("Failed to load the library");
return;
}
scope (exit)
unloadMeCab();
```