Code Monkey home page Code Monkey logo

php-mecab-ffi's People

Contributors

ranvis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

yi-pixel shilik

php-mecab-ffi's Issues

split function needed

@ranvis
Thank you for the great project for php8.*. I have been looking a php8 compatible mecab module for quite a long time, but none of them worked until now.

Is there any way to split the string using current project functions?
if yes, how to do it?

I used your example code snippets, and got the following output.

: BOS/EOS,*,*,*,*,*,*,*,* バナナはおやつに入りますか?: 名詞,固有名詞,一般,*,*,*,バナナはおやつに入りますか?,バナナハオヤツニハイリマスカ,バナナワオヤツニハイリマスカ : BOS/EOS,*,*,*,*,*,*,*,*
Obviously, the text is not split, is this correct?

if not, would you please add a split function? thank you very much.

AJAX call error :Uncaught FFI\\Exception

I tested with php command line, and it worked as expected.
When I made an AJAX call to the server, apache server log showed the following error message.

Got error 'PHP message: PHP Fatal error: Uncaught FFI\\Exception: FFI API is restricted by "ffi.enable" configuration directive in /var/www/html/corpus/vendor/ranvis/mecab/src/Env.php:35\nStack trace:\n#0 /var/www/html/corpus/vendor/ranvis/mecab/src/Env.php(35): FFI::cdef()\n#1 /var/www/html/corpus/ngram.php(12): Ranvis\\MeCab\\Env->__construct()\n#2 /var/www/html/corpus/ngram.php(378): wbMecab->__construct()\n#3 {main}\n thrown in /var/www/html/corpus/vendor/ranvis/mecab/src/Env.php on line 35'

It seems to be related with ffi module.
Here is a list of php modules I have. Not sure what problem is it. Have you ever encountered similar error?

`[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.