DeanLight / spannerlib

https://deanlight.github.io/spannerlib/
Apache License 2.0
4 stars 1 forks source link

rgx_span ie function bug #110

Closed mahmouddiab2000 closed 1 year ago

mahmouddiab2000 commented 1 year ago

A simple code to reproduce the bug:

%%rgxlog
Spans(X) <- rgx_span("corona virus 2019","corona virus")
?Spans(X)

We got an empty table, maybe it's related to the space, because when we tried the pattern "corona " it worked. currently we wrote our own ie function that do the same functionality Priority: medium

loayshaqir1 commented 1 year ago

That is not a bug, when using ie functions from rust your patterns should follow rust's regex syntax. for example your code should look like this:

%%rgxlog
Spans(X) <- rgx_span("corona virus 2019","corona[[:space:]]virus") -> (X)
?Spans(X)

Here is a link to rust's regex syntax: Rust's regex syntax