deepai-solutions / core_nlp Goto Github PK
View Code? Open in Web Editor NEWProject to share nlp algorithms
Project to share nlp algorithms
Em chạy thì nó bị lỗi này mà ko biết sửa thế nào cả
Using TensorFlow backend.
Traceback (most recent call last):
File "demo.py", line 11, in
model_path='models/pretrained_tokenizer.crfsuite')
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/crf_tokenizer.py", line 98, in init
self.bi_grams = load_n_grams(config_root_path + bi_grams_path)
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/utils.py", line 10, in load_n_grams
words = ast.literal_eval(words)
File "/usr/lib/python2.7/ast.py", line 80, in literal_eval
return _convert(node_or_string)
File "/usr/lib/python2.7/ast.py", line 79, in _convert
raise ValueError('malformed string')
ValueError: malformed string
voccer@voccer:~/Desktop/text_classification/core_nlp$ python demo.py
Using TensorFlow backend.
Traceback (most recent call last):
File "demo.py", line 11, in
model_path='models/pretrained_tokenizer.crfsuite')
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/crf_tokenizer.py", line 98, in init
self.bi_grams = load_n_grams(config_root_path + bi_grams_path)
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/utils.py", line 10, in load_n_grams
words = ast.literal_eval(words)
File "/usr/lib/python2.7/ast.py", line 80, in literal_eval
return _convert(node_or_string)
File "/usr/lib/python2.7/ast.py", line 79, in _convert
raise ValueError('malformed string')
ValueError: malformed string
❯ python demo.py
2021-06-02 20:59:41.558455: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-06-02 20:59:41.558484: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Using TensorFlow backend.
Loading model from file models/pretrained_tokenizer.crfsuite
Traceback (most recent call last):
File "demo.py", line 25, in
keras_text_classifier.train(X, y)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/text_classification/short_text_classifiers.py", line 76, in train
self.model = self.build_model(input_dim=(X.shape[1], X.shape[2]))
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/text_classification/short_text_classifiers.py", line 225, in build_model
model = Sequential()
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 522, in _method_wrapper
result = method(self, *args, **kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/sequential.py", line 110, in init
name=name, autocast=False)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 522, in _method_wrapper
result = method(self, *args, **kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/training.py", line 245, in init
super(Model, self).init(**kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 522, in _method_wrapper
result = method(self, *args, **kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/base_layer.py", line 350, in init
self._init_set_name(name)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/functional.py", line 501, in _init_set_name
self._name = backend.unique_object_name(
AttributeError: module 'keras.backend' has no attribute 'unique_object_name'
=> Khi cài những lib trong requirement.txt, còn y/c cài thêm Tensorflow, xong rồi em chạy file demo.py của anh nó ra lỗi vậy. Help em với anh !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.