Skip to content

Execution error #16

Description

@orbxball

Hi,

I'm using this tool for parsing Chinese sentences.
However, I encounter two problems which make me not be able to do the parsing work.

First, when I ran
python 文章/模型訓練/臺華新聞做語料.py
it occurs this error

Traceback (most recent call last):
  File "文章/模型訓練/臺華新聞做語料.py", line 2, in <module>
    from 文章.對語料庫網站掠資料落來 import 對語料庫網站掠資料落來
ModuleNotFoundError: No module named '文章'

I guess it might be the encoding error. It is a smaller problem.

Second, I use ipython to execute the .py instead.
It is also caught on this error

In [1]: %run 文章/模型訓練/臺華新聞做語料.py
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/tmp2/b03502040/data/icorpus/文章/模型訓練/臺華新聞做語料.py in <module>()
     32
     33 if __name__ == '__main__':
---> 34         臺華新聞做語料().做()

/tmp2/b03502040/data/icorpus/文章/模型訓練/臺華新聞做語料.py in 做(self)
     21                                 句物件=分析器.轉做句物件(華語句)
     22                                 華.append(譀鏡.看分詞(句物件))
---> 23                         閩.extend(資料['閩南語'].split('\n'))
     24                         if len(華)!=len(閩):
     25                                 print(華[-100:],閩[-100:])

KeyError: '閩南語'

If I cannot generate the corpus, I cannot train the model and translate Chinese sentences into 台羅拼音 further. Thank you for any instructions on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions