-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix FR formatting #68
Conversation
@@ -16,6 +16,12 @@ regex_definitions: | |||
# Regular expression to match the prefixes that indicate a house number or name. | |||
kHouseNumberOrNameOptionalPrefixRe: | |||
regex_fragment: '(?:(?:no|nr|°|º|numéro)[-.\s]*)?' | |||
|
|||
kCommaOrNewlineSeparator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this similar to kCommaOrWhitespaceSeparator
? I'm concerned about introducing multiple different separators on multiple country files. Ideally, we use shared ones as most as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
French street names can have spaces in them, the kCommaOrWhitespaceSeparator ends up matching the first space and thus leading to the wrong parsing of the Place Charles de Gaulle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Then probably you want something like (?:, |\n|\r|,)+
?
- capture: | ||
output: address-overflow | ||
parts: [ {regex_fragment: '(?:[^,\r\n]+)'} ] | ||
prefix: {regex_reference: kSpaceOptionalPrefixRe} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just inlining {regex_fragment: '\s*' }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % a couple of updates.
@@ -16,6 +16,12 @@ regex_definitions: | |||
# Regular expression to match the prefixes that indicate a house number or name. | |||
kHouseNumberOrNameOptionalPrefixRe: | |||
regex_fragment: '(?:(?:no|nr|°|º|numéro)[-.\s]*)?' | |||
|
|||
kCommaOrNewlineSeparator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Then probably you want something like (?:, |\n|\r|,)+
?
output: | ||
street-address-alternative-1: "Appt 1, 58 rue du Gue Jacquet" | ||
street-address-alternative-1: "58 rue du Gue Jacquet, Appt 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you drop the space after the comma? I would like to validate that case as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
This CL changes the formatting expression for address_overflow, making it go second after the building location