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

How can i use "or" operator in regex expression in corpus query language ? #1

Open
svjack opened this issue Jul 10, 2021 · 1 comment

Comments

@svjack
Copy link

svjack commented Jul 10, 2021

I require following pattern match in corpus query language
pythonre.findall("委托|代理", "把委托书或者代理文件")
截屏2021-07-10 下午4 45 57
but it seems not support,
Do you have some ideas ?

@liao961120
Copy link
Owner

liao961120 commented Jul 10, 2021

Yes, you are right, I did not implement the full set of CQL (e,g, | operation).
Given this pattern [word="委托"] | [word="代理"] however, you can run two independent queries and concat the results together:

cql1 = '[word="委托"]'
cql2 = '[word="代理"]'

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