-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Using Juman++ in dart using dart:ffi #145
Comments
There should not be platform dependent code in Juman++ and it runs on M1-based macs natively without problem. There is, however, no C API, only C++ one. I am not familiar with Dart and its FFI, but most of FFI interactions happen via C API. Finally, the Juman++ model is not just a neural net and TensorFlow Lite compatibility really makes no sense in this context. |
Thanks for your reply! I never tried to use c++ in dart:ffi, however it looks like c++ should be usable if c++ symbols are marked as Sorry about the stupid tensorflow assumption. Somehow I thought the RNN uses tensorflow, but briefly looking at the code it seems like juman is using a custom build RNN. |
It is not just a matter of |
Thanks again for the reply. One more question, because for mobile the download size matters, should I also expect a size of 300mb? |
Yes, model is pretty large, it is an unfortunate tradeoff with analysis accuracy here. I am not really sure that Juman++ is a good fit for mobile if the analysis accuracy is not of utmost importance.
|
I think the size would not be too much of an issue as long as it does not cross the gigabyte mark. That sounds discouraging, are there plans for a C-API? |
After further investigation, you are right dart:ffi can only bind to C-APIs. |
Unfortunately, it is very low in the list of my priorities, I probably won't work on it in any foreseeable future. |
That is sad to hear. echo "魅力がたっぷりと詰まっている" | jumanpp But if that also has some big hindrances I will stick to mecab. |
The simplest entry point is something like https://github.com/eiennohito/jumanpp-t9/blob/master/src/jumanpp_t9.cc and sure the C API can be done. I don't think that I will work on in in the nearest future, though. MeCab is probably your best bet as it has C API. I will probably implement MeCab-compatible C API if I will implement C API in the future, because MeCab is de-facto standard. |
I am developing a flutter app and would like to include morphological analysis. Now I am considering writing a package to use juman++ in dart using dart:ffi. This allows using native c code in dart.
Now I am wondering if there is platform-dependent code or something similar which would prevent this project to run on iOS/Android. Are the ML models used also available for TensorFlow lite?
Any help or suggestions would be very much appreciated.
The text was updated successfully, but these errors were encountered: