pelias / pelias/parser

handling of quoted text

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
64
Forks
26
PR merge metrics
No merged PRs in 30d

Description

currently, quotes are considered boundary characters with the same semantic meaning as a comma or tab.

I think it would be better to consider quoted sections as 'literal', so that no permutations are generated for these section of the text.

eg. something like 'A B C "D E F" G H' would produce permutations of:
[A, B, C], [A, B], [A], [B, C], [B], [C], [D, E, F], [G, H], [G], [H] (where the inner group produced no permutations)

this can probably be achieved by recording the leading and trailing boundary character which was used to delimit each section, we can then check if BOTH the leading and trailing character are from the 'quote' class, and if so, then disable permutations for that group.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the parser's boundary-character handling and permutation generation. Use the quoted-text example as the behavioral check: quoted sections should remain literal with no inner permutations, while unquoted sections should retain their existing permutations.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.