[Script] WME Validator 2020.04.12 (PLACES BETA)

Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Moderators: Unholy, bextein, Glodenox, JustinS83

Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby PesachZ » Mon Feb 23, 2015 5:43 pm

qwaletee wrote:Note that [A-Z][A-Z]* is equivalent to [A-Z]+

* means 0 or more
+ means 1 or more

His code included a space in the second class [A-Z][A-Z ]* meaning starting with a capital, followed by any number of capitals or spaces.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby PesachZ » Wed Feb 25, 2015 3:46 am

qwaletee wrote:The "hard" part of the second one is that we are looking for two things, either a lowercase at the beginning, ro a space and a lowercase anywhere. We can easily fix that by looking for both separately, but a trick is to put a space in front of your template, so that it is as if every name starts with a space.

So, for your first one, all you need is ("template"="regexp"): "${street}"="[A-Z]{2}" which says street name contains any capital letter somewhere followed immediately by any capital letter. It doesn't matter where in the string it occurs, regexp by default looks throughout.

For your second: " ${street}"=" [a-z]" - there is an space after each opening quote. Again, looks anywhere for a space followed by a lowercase, and since in the template we start with a space, that will include if it is at the beginning - Waze doesn't have a space there, but due to the template, t is the same thing.

Now we can combine the two:

" ${street}"="( [a-z])|([A-Z]{2})"

The parentheses make each statement stand by itself without interfering with the other. The bar | says "check for for or the other, either matches." I'm not sure if the parentheses are needed, I don't recall offhand whether the {2} will try to apply itself to the whole thing or not. I think it doesn't, but I'm lazy.

I have not tried any of the above, so I might have messed up somewhere, but give it a whirl.

*Edit: Note that the second expression in the regexp should NOT have a space before it, unless you want to limit reporting to cases where the two caps are the beginning of a word. For example "MaIN St" only matches as a problem if you leave the space out.

I believe the multiplier only applies to immediately preceding statement unless it is a group (in which case it applies to the entire group). So in the fila rule the second parenthesis after the bar is unnecessary.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby PesachZ » Wed Feb 25, 2015 5:16 pm

ispyisail wrote:Hi guys

Its not working as expected

Cut and paste from validator just in case

Code: Select all
${typeRank}:${street}
/^1[01]:.*( [a-z)|([A-Z]{2})


It picked up many road but not what i was after

examples

Crawford Rd
Fonterra Te Rapa
Piwakawaka Court
Arncliffe Tce

Thoughts?

Thanks

Missing closing square bracket

I think this is looking for any road type 10 or 11, which has in the name a string of space, followed by two characters which be any lowercase or uppercase, or parentheses or a pipe or opening square bracket. Basically I think it is matching any two consecutive letters "case insensitive" or any of the following [()|

Regardless of what exactly it is matching try this to fix it. This still only looks for matches on road type 10 or 11

Code: Select all
${typeRank}:${street}
/^1[01]:.*( [a-z])|([A-Z]{2})

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby PesachZ » Thu Feb 26, 2015 6:33 pm

While we're on the topic you can substitute [0-9] with \d
So a search for ^\d+$ will find any string of any length containing exclusively numbers.
For more details see RegEx Tutorial

Sent using Tapatalk for Android 4.4.2
edited: typo
Last edited by PesachZ on Thu Feb 26, 2015 7:09 pm, edited 1 time in total.
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby PesachZ » Mon Apr 06, 2015 9:17 pm

ispyisail wrote:My rule is getting so long that I might need to create a rule generator

Code: Select all
 !/( Row| Point| Hospital| Supermarket| Fall| Brae| Wynd| Mile| Mohr| Dell| One| Trak| Trail| Ramp| Esplanade| Cir| View| Gate| Green| Bvd| Gln| Mews| Gdns| Run| Runway|Unknown Name| Trl| Cl| Gr| Spur| Rise| Cres| Aly| Ave| Blvd| Bikeway| Bnd| Bridge| Busway| Bypass| Chase| Cl| Cove| Cr| Ct| Dr| East| Ent| Exit| Fwy| Gdn| Grn| Grv| Hts| Hwy| Jct| Link| Line| Ln| Lp| Mtwy| Mw| North| Park| Pde| Pl| Pkwy| Prom| Railway| Ri| Rd| South| Sq| St| Tce| Tunnel| Turn| Vw| Vst| Way| West| Xing|^$)$|^(State |Exit to: |The |Exit |Entry )/


I wonder what the max length is?

You could use the power of regex to shorten it by reusing certain common letters

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby PesachZ » Thu May 07, 2015 2:48 am

This has happened before, the developer is most definitely tied up in his real life, and will push an update in the near future. Just bear with it for a bit, it shouldn't be too long.

Take this opportunity to experience wme without validator, realize its benefits, and thank the author for the awesome job he's done with it so far.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby PesachZ » Thu May 07, 2015 2:54 pm

The author previously explained his rationale for the expiration date.

berestovskyy wrote:Hi!
Sorry, I missed the expiration date :(


alexschrod wrote:In the next update, if the author wants this kind of behavior in place, they should add another check first that sends a request to see if there is an actual update ready

Validator does not send or receive any data from the internet for security reasons.

wlodek76 wrote:Could you explain us why do you lock this script ? What is purpose of doing this ?

The script has an expiration date since the v0.3. The first few versions expired just in 7 days to force users to update the script...

It also forces me to update the script and publish a new version. And it really motivates me lately...



Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby PesachZ » Fri Jun 19, 2015 4:51 pm

crazycaveman wrote:
ispyisail wrote:Hi all

I'm looking for a custom search that will find all "Street" and "Primary Street" that have more than one "alternate name"

as always

Thanks


Try this:
Code: Select all
Template: ${typeRank}:${altStreet[1]}
Regexp: /1[01]:.+/

Would that also match segments with only one alt name?

Sent using Tapatalk for Android
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby PesachZ » Sun Jul 19, 2015 1:52 pm

crazycaveman wrote:Here's an updated type list (not typerank):
${type}
Code: Select all
1:  Street
2:  Primary Street
3:  Freeway
4:  Ramp
5:  Walking Trail
6:  Major Highway
7:  Minor Highway
8:  Dirt Road / 4X4 Trail
9:
10: Pedestrian Boardwalk
11:
12:
13:
14: Ferry
15:
16: Stairway
17: Private Road
18: Stairway
19: Runway/Taxiway
20: Parking Lot Road
21: Service Road (deprecated)

FYI ferries (at least in the USA) are now using type 15
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby PesachZ » Tue Sep 08, 2015 6:39 pm

taco909 wrote:Not sure if this was mentioned before.
Validator triggers an error on "Incorrect abbreviation" when the street name terminates with a period.

With the new handling of cardinals, we need to have Validator ignore this iff the last character pair is " N.", " S.", " E.", or " W."

Example: "W Avenue N." comes out properly on TTS as "West Avenue N"
This is valid, but Validator triggers on the "N."

This has been mentioned above, but validator has not been updated yet.

You can add NE. and SW. to the list

Sent using Tapatalk for Android
PesachZ
Wiki Master
Wiki Master
 
Posts: 4512
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1998 times
Been thanked: 2374 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: JimboBaggins1966, Mythdraug