We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我的环境:anaconda 3.7 tensorflow: 2.2.0
程序:
import fool text = "林语堂是中国最好的英文作家。" print(fool.cut(text))
The text was updated successfully, but these errors were encountered:
tensorflow2.0及以上版本没有这个模块了。tensorflow/tensorflow#30794
Sorry, something went wrong.
tensorflow2.0及以上版本一些API发生了变化,卸载安装1.X的版本就可以使用。如果不想卸载tensorflow2.0,可以做以下修改,亲测可用,本人修改后运行fool.cut(text)和fool.analysis(text)都没问题:
1.安装tensorflow_addons: pip install tensorflow-addons 2.找到Anaconda3下的Lib/site-packages/fool 3.修改model.py文件中的代码: 第8行改为from tensorflow_addons.text import viterbi_decode 4.修改predictor.py文件中的代码: 第8行改为from tensorflow_addons.text import viterbi_decode 第32行改为with tf.io.gfile.GFile(path, "rb") as f: 第33行改为graph_def = tf.compat.v1.GraphDef() 第53行改为self.sess = tf.compat.v1.Session(graph=self.graph)
No branches or pull requests
我的环境:anaconda 3.7
tensorflow: 2.2.0
程序:
The text was updated successfully, but these errors were encountered: