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

qdap rm_url doesn't work with Chinese text #258

Open
hwaight opened this issue Mar 3, 2020 · 0 comments
Open

qdap rm_url doesn't work with Chinese text #258

hwaight opened this issue Mar 3, 2020 · 0 comments

Comments

@hwaight
Copy link

hwaight commented Mar 3, 2020

Hello,
I just wanted to flag that Qdap doesn't work with Chinese text unless it has been pre-segmented. It ends up picking up extra text because Chinese text doesn't include word spaces. Folks who work with Chinese text typically run a word segmentation program on the text before using it, but you need to remove the URLs first before running the word segmenter because sometimes the segmenter will break up the URLs.

I used the following regular expression work around. The only cases where it doesn't work are when English text direct follows the URL with no spaces. So it wouldn't be suitable for a mixed-language corpus:
"http://[a-zA-Z/.0-9$–\-+!*‘()]{1,}|www[.]{1}[a-zA-Z/.0-9$–\-+!*‘()]{1,}"

@hwaight hwaight changed the title qdap doesn't work with Chinese text qdap rm_url doesn't work with Chinese text Mar 3, 2020
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

1 participant