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

【优化建议】冗余代码 #61

Open
linhongzhao321 opened this issue Oct 10, 2019 · 2 comments
Open

【优化建议】冗余代码 #61

linhongzhao321 opened this issue Oct 10, 2019 · 2 comments
Labels

Comments

@linhongzhao321
Copy link

如下图所示,Jieba.php的这部分代码应该是无意义的重复吧?应该可以去掉下面那一段
image

@fukuball
Copy link
Owner

fukuball commented Oct 14, 2019

目前這兩階段還是必要的,上面分塊後,各符合了三種不同的 pattern,底下再依據分塊是屬於哪個 pattern 做不同的處理,也許有更好的寫法,但目前是必須的。

@fapi-china
Copy link

目前這兩階段還是必要的,上面分塊後,各符合了三種不同的 pattern,底下再依據分塊是屬於哪個 pattern 做不同的處理,也許有更好的寫法,但目前是必須的。

不理解,self::$cjk_all仅在Jieba::init()中被赋值。在这个循环里面没有被更改,那么self::$cjk_all不是永远不变的吗?

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

No branches or pull requests

3 participants