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

wk['<D'] --- Error in file_coding(code[1]) : Cannot open file #57

Open
hetal-cq opened this issue Aug 8, 2017 · 1 comment
Open

wk['<D'] --- Error in file_coding(code[1]) : Cannot open file #57

hetal-cq opened this issue Aug 8, 2017 · 1 comment

Comments

@hetal-cq
Copy link

hetal-cq commented Aug 8, 2017

1、环境信息:
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936
[2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] jiebaR_0.9.1 jiebaRD_0.1 hetalpkg_0.1.0 data.table_1.9.8

loaded via a namespace (and not attached):
[1] Rcpp_0.12.8 digest_0.6.12 rprojroot_1.2 jsonlite_1.0 backports_1.0.5
[6] magrittr_1.5 evaluate_0.9 stringi_1.1.2 rmarkdown_1.4 tools_3.3.3
[11] stringr_1.1.0 yaml_2.1.13 base64enc_0.1-3 htmltools_0.3.6 knitr_1.14

2、全部错误信息:
Error in file_coding(code[1]) : Cannot open file

3、代码:

wk = worker()
wk['<D']

4、详细问题:
语句如果以'<'开头会切词失败

5、详细信息

wk = worker()
wk['<D']
Error in file_coding(code[1]) : Cannot open file
wk['D']
[1] "D"

@qinwf
Copy link
Owner

qinwf commented Aug 9, 2017

谢谢报告!

可能是 Windows 把这个路径识别成 D 盘盘符了,之后考虑关闭默认文件路径的检测行为。

现在可以用 work(write = "NOFILE") 来关闭路径检测。

参见 https://qinwenfeng.com/jiebaR/section-3.html#-write-nofile

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