Comments (10)
@rain1024 Thank you for your reply.
My underthesea is 1.1.5
import underthesea
underthesea .version
'1.1.5'
from underthesea.
I read in fasttext issue and there is someone have this problem when load model in windows. It cannot load the labels and some otherthing of the model. This is not underthesea error.
The problenm is in this link
https://github.com/salestock/fastText.py/issues/112
from underthesea.
@AlexBlack2202 What version of underthesea are you using?
I re-test classify module with these commands below and it works
conda create -n underthesea_test python=3.5
source activate underthesea_test
pip install underthesea
pip install Cython
pip install future scipy numpy scikit-learn
pip install -U fasttext --no-cache-dir --no-deps --force-reinstall
underthesea data
$ python
Python 3.5.5 |Anaconda, Inc.| (default, Mar 9 2018, 19:48:53)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from underthesea import classify
>>> classify("Hội đồng tư vấn kinh doanh Asean vinh danh giải thưởng quốc tế")
['Kinh doanh']
from underthesea.
Did you test my suggestion in your branch new conda environment?
Does it work?
from underthesea.
Hi @rain1024
I do not use conda, i use purge python 3.6.3
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
from underthesea.
I think you should re-install underthesea and follow my steps above.
from underthesea.
Thank @rain1024
I have installed in another computer with anaconda. And it still have that problem.
looking deeply in your file model_fasttext.py and i've got something
import fasttext
model= fasttext.load_model("fasttext.model")
dir (model)
['class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref', '_model', 'bucket', 'dim', 'encoding', 'epoch', 'label_prefix', 'labels', 'loss_name', 'lr_update_rate', 'maxn', 'min_count', 'minn', 'model_name', 'neg', 'predict', 'predict_proba', 't', 'test', 'word_ngrams', 'ws']
//I load model successfullmodel.predict("HLV ngoại đòi gần tỷ mỗi tháng dẫn dắt tuyển Việt Nam")
[[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
It return a list of empty list. So when do .replace("label", "") it wrong.
i check the fasttext version in my computer
import pkg_resources
pkg_resources.get_distribution("fasttext").version
'0.8.3'
I think it is not compatiple of my fasttext version and your model. Can you please tell me your fasttext version?
from underthesea.
Here are my dependencies
$ source activate underthesea_test
$ pip freeze
certifi==2018.1.18
click==6.7
Cython==0.27.3
fasttext==0.8.3
future==0.16.0
joblib==0.11
languageflow==1.1.6rc2
numpy==1.14.1
pandas==0.22.0
python-crfsuite==0.9.5
python-dateutil==2.7.0
pytz==2018.3
scikit-learn==0.19.0
scipy==1.0.0
six==1.11.0
underthesea==1.1.6
xgboost==0.7.post3
According to this result, I have fasttext 0.8.3 in my environment
What is your operating system?
from underthesea.
@rain1024
I use windown 10. When i use in bash window 10 (base on ubuntu). It run successfull.
But it can not run in window 10. The only thing difference is xgboost. In my window is xgboost==0.7 and in bash is xgboost==0.7.post3
from underthesea.
@AlexBlack2202 Thanks for your clarification.
I will close this issue here
from underthesea.
Related Issues (20)
- Permission error when trying to remove the downloaded model zip file HOT 2
- How to install underthesea on Alpine Docker image HOT 3
- Support PyTorch v2 for dependency parsing HOT 2
- Agents with LLMs
- KeyError: '__getitems__' HOT 1
- Create text to speech with custom voice HOT 1
- VLC Corpus 2023
- underthesea for another languages
- Vietnamese Fiction Dataset
- Vietnamese Abstract Meaning Represeantion
- Optimization of Underthesea Codebase Size
- Lỗi gặp phải khi chuyển văn bản thành giọng nói (TTS) HOT 1
- không tải được, nó hiện lỗi ModuleNotFoundError: No module named 'maturin HOT 5
- Support python 3.12 (2024Q1)
- Bug detecting names with hyphens.
- Incompatibility with sklearn >= 1.5
- field list be able returned from classify function?
- 🌊 Underthesea v7
- Support underthesea_core with python 3.12
- Rust bindings in Docker on M1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from underthesea.