Skip to content
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

關於res and Segmentation fault #3

Open
AliceLee1203 opened this issue Oct 14, 2017 · 18 comments
Open

關於res and Segmentation fault #3

AliceLee1203 opened this issue Oct 14, 2017 · 18 comments

Comments

@AliceLee1203
Copy link

請問res資料夾是要自己創建嗎?
因為我跑了./thucke -i ./test1.txt -n 5 -m ./res
他出現
invalid model_path: ./res
invalid model_path: ./res
Segmentation fault: 11

目前還是用內附的text1文本,Segmentation fault?

謝謝提供開源

@mysbupt
Copy link
Contributor

mysbupt commented Oct 14, 2017

是的,./res 目录是要自己创建的,然后把模型文件下载解压到这个目录下(下载下来的模型是一个tgz的压缩包,解压方法:tar -zxvf *.tgz,解压出来是一个目录,里面有两个文件:thucke_models, thulac_models,把这两个文件copy到./res/目录下),再运行'./thucke -i ./test1.txt -n 5 -m ./res'就可以了。

@AliceLee1203
Copy link
Author

謝謝您的回覆,好感動。我的是OSX系統,我先來試試,想問說這個是不是已經內建斷詞,有沒有可能套用我自己斷完詞的結果使用呢?

@AliceLee1203
Copy link
Author

AliceLee1203 commented Oct 15, 2017

2017-10-15 3 08 47
2017-10-15 3 08 55
我這兩張圖這樣對嗎?可是它顯示說他是個directory...不能用...

@AliceLee1203
Copy link
Author

2017-10-15 3 09 47
有看到thucke, 沒有看到thulac

能收到您的回覆我真的超開心!真的很謝謝您!

@mysbupt
Copy link
Contributor

mysbupt commented Oct 15, 2017

  1. 我使用macOS Sierra 10.12.6测试, 编译和运行都没有问题
  2. THUCKE 内部集成了分词系统,使用的是THULAC分词系统和对应模型(关于THULAC分词系统,详情请参考:https://github.com/thunlp/thulac);目前还不支持disable掉内嵌的分词系统。
  3. thulac集成在了代码里,没有单独编译成可执行文件。如果有兴趣可以查看src中的源码,程序入口文件是thucke.cpp,关键词抽取主要在keywordExtract.cpp文件中。
  4. 欢迎使用thucke关键词抽取系统,如果有什么问题尽管提出我们不断改进,谢谢

@AliceLee1203
Copy link
Author

AliceLee1203 commented Oct 15, 2017

所以我現在使用的問題是卡在哪裡呢?他terminal顯示那樣:/

@mysbupt
Copy link
Contributor

mysbupt commented Oct 15, 2017

你的报错提示 ./thucke is a directory,应该是执行命令的路径不对,要在THUCKE目录下面执行./thucke,你好像在THUCKE/res/目录下运行的,THUCKE/res/目录下没有thucke这个可执行文件。

@AliceLee1203
Copy link
Author

好怪...覺得有點亂了,不知道您方不方便提供更清楚的使用次序呢?...

@AliceLee1203
Copy link
Author

里面有两个文件:thucke_models, thulac_models,把这两个文件copy到./res/目录下
2017-10-15 3 48 14
在res的目錄下了,但還是不能運行'./thucke -i ./test1.txt -n 5 -m ./res'

@mysbupt
Copy link
Contributor

mysbupt commented Oct 15, 2017

把thucke_models, thulac_models这两个文件copy到./res/目录下,文件名不要改成thucke, thulac,保留原来的名字,再运行一下看行不行

@AliceLee1203
Copy link
Author

我名字都沒有更動呢,他原本名字就長這樣。

@mysbupt
Copy link
Contributor

mysbupt commented Oct 15, 2017

你的res目录下的model从哪里下载的?是从:http://thucke.thunlp.org/ 这个页面中指定的链接(如下图红色方框中)下载的么?
2017-10-15 16 09 12

@AliceLee1203
Copy link
Author

我是在這個code頁面 download as zip, 我來試試你那個^_^ 謝謝親願意花那麼多時間幫我~

@AliceLee1203
Copy link
Author

好酷!希望我們的實驗室也能跟你們一樣強!

@AliceLee1203
Copy link
Author

下載中,好像滿大的QQ

@AliceLee1203
Copy link
Author

已經下載完成,也把thucke_models, thulac_models这两个文件copy到./res/目录下,但指令./thucke -i ./test1.txt -n 5 -m ./res還是沒辦法運行。
2017-10-19 3 47 46
2017-10-19 3 47 50

再麻煩您了!真的相當感謝您!

@mysbupt
Copy link
Contributor

mysbupt commented Oct 19, 2017

编译了么?执行路径对不对?

@AliceLee1203
Copy link
Author

2017-10-19 8 35 57
2017-10-19 8 36 03
我到該路徑下了,在這兩個路徑下make(編譯)都發生錯誤。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants