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

Search fails on query like a:b #173

Open
eric-laporte opened this issue Feb 19, 2024 · 1 comment
Open

Search fails on query like a:b #173

eric-laporte opened this issue Feb 19, 2024 · 1 comment

Comments

@eric-laporte
Copy link
Member

A search query of the form a:b fails. The interface displays an error message suggesting the semicolon has been mistaken for a marker of subgraph call.

What steps will reproduce the problem?

  1. Open the French 80jours corpus with default configuration
  2. Launch Locate pattern with default configuration and a query of the form a:b, e.g. trois:sienne or jours:6, without spaces before or after the ':' character

What is the expected output?

A "Result info" dialog box should provide the number of occurrences found.

What do you see instead?

An error message is displayed in red: 'regexp: unexpected subgraph call in token_sequence_2_integer_sequence'. The search fails.

More info

  • Unitex/GramLab IDE version: 3.3.7
  • UnitexToolLogger version: 3.3.7
@martinec
Copy link
Member

Internally, an expression like trois:sienne is converted into a graph:

Thus, the colon : is interpreted as an instruction to call a sub-graph.

For the time being, you can type trois\:sienne as a workaround.

Since this issue is directly related to the use of Locate with Regular Expressions rather than with Graphs, a future enhancement could involve automatically escaping colons before generating the graph representation.

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

No branches or pull requests

2 participants