WME Validator Localization for Indiana

This script localizes WME Validator for Indiana, USA. You also need main package (WME Validator) installed.

目前为 2015-12-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name WME Validator Localization for Indiana
  3. // @namespace https://gf.qytechs.cn/en/users/9555
  4. // @version 1.1.1.31
  5. // @author xanderb
  6. // @description This script localizes WME Validator for Indiana, USA. You also need main package (WME Validator) installed.
  7. // @match https://editor-beta.waze.com/*editor/*
  8. // @match https://www.waze.com/*editor/*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12. //
  13. /*
  14. See Settings->About->Available checks for complete list of checks and their params.
  15. Examples:
  16. Enable #170 "Lowercase street name" but allow lowercase "exit" and "to":
  17. "170.enabled": true,
  18. "170.params": {
  19. "regexp": "/^((exit|to) )?[a-z]/",
  20. "},
  21. Enable #130 "Custom check" to find a dot in street names, but allow dots at Ramps:
  22. "130.enabled": true,
  23. "130.params": {
  24. "titleEN": "Street name with a dot",
  25. "problemEN": "There is a dot in the street name (excluding Ramps)",
  26. "solutionEN": "Expand the abbreviation or remove the dot",
  27. "template": "${type}:${street}",
  28. "regexp": "D/^[^4][0-9]?:.*\\./",
  29. },
  30. *Note: use D at the beginning of RegExp to enable debugging on JS console.
  31. *Note: do not forget to escape backslashes in strings, i.e. use "\\" instead of "\".
  32. */
  33.  
  34. window.WME_Validator_United_States = {
  35. ".country": "United States",
  36. ".codeISO": "US",
  37. ".author": "xanderb",
  38. ".updated": "2015-12-01",
  39. ".link": "TODO: ",
  40. "128.enabled": true,
  41. "128.params": {
  42. "titleEN": "Bad TTS Street name",
  43. "problemEN": "Streets that start with St and Dr result in TTS reading Street or Drive",
  44. "solutionEN": "Add a period after Jr, St, Dr, or Rev where required",
  45. "template": "${street}#${altStreet[#]}",
  46. "regexp": "/((^| )(St|Dr)(?! ((BYP|Ext|[NEWS][EW]?)\\b|\/|\\())|(Jr|Rev)) /"
  47. },
  48. "128.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations",
  49. "129.enabled": true,
  50. "129.params": {
  51. "titleEN": "Incorrect State or US Highway",
  52. "problemEN": "Indiana uses IN and US for numbered highway names",
  53. "solutionEN": "Rename the Street or Alt Street",
  54. "template": "${state}:${street}#${altStreet[#]}",
  55. "regexp": "/Indiana:.*(In Hwy |State Hwy |In-|SR-|SH-|State Rd |IN=|State Rte |U\.?[Ss]\.? [Hh](WY|wy|ighway))/"
  56. },
  57. "129.solutionLink": "W:Indiana/Test",
  58. "130.enabled": true,
  59. "130.params": {
  60. "titleEN": "Short Parking Lot",
  61. "problemEN": "Dead End Parking Lot is less that 30 meters",
  62. "solutionEN": "Does it really need to be there?",
  63. "template": "${deadEnd}:${typeRank}:${length}",
  64. "regexp": "/1:7:([0-2]?[0-9])$/"
  65. },
  66. "130.solutionLink": "W:Best_map_editing_practice#Parking_Lots",
  67. "131.enabled": true,
  68. "131.params": {
  69. "titleEN": "Not Indiana",
  70. "problem": "The segment is assigned to another state",
  71. "solutionEN": "Make sure you are editing in Indiana and change it",
  72. "template": "${state}",
  73. "regexp": "!/Indiana/"
  74. },
  75. "131.solutionLink": "W:Creating_and_editing_road_segments#Address_Properties",
  76. "132.enabled": true,
  77. "132.params": {
  78. "titleEN": "Wrong name for City or County street",
  79. "problemEN": "CS and Cs are not read correctly by TTS or County Hwy Name is wrong",
  80. "solutionEN": "Check sources and change the street's name",
  81. "template": "${state}:${street}#${altStreet[#]}",
  82. "regexp": "/Indiana:.*(Cs-|CS-|County Hwy |County Rd |CR |Cr-|Ch-|Co Rd )/"
  83. },
  84. "132.solutionLink": "W:Indiana",
  85. "133.enabled": true,
  86. "133.params": {
  87. "titleEN": "City Name on Freeway",
  88. "problemEN": "City names on Freeway segments can cause detours",
  89. "solutionEN": "Remove the City Name",
  90. "template": "${typeRank}:${city}",
  91. "regexp": "/15:.+$/"
  92. },
  93. "134.enabled": true,
  94. "134.params": {
  95. "titleEN": "Unapproved Non-drivable type",
  96. "problemEN": "Not all Walking Paths and Pedestrian Boardwalks should be mapped",
  97. "solutionEN": "Have a Rank 5+ editor approve and lock it",
  98. "template": "${type}:${lock}",
  99. "regexp": "/(5|10):[1-4]/"
  100. },
  101. "135.enabled": true,
  102. "135.params": {
  103. "titleEN": "Wrong road type (major)",
  104. "problemEN": "All US Highways should be at least Major Highway (except BUS, SPUR, LOOP)",
  105. "solutionEN": "Change the road type to Major Highway",
  106. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  107. "regexp": "/^[1-9][^245]?:.*#(US Hwy |US-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*@/i"
  108. },
  109. "135.solutionLink": "W:Road_types/USA#Major_Highway",
  110. "136.enabled": true,
  111. "136.params": {
  112. "titleEN": "Wrong road type (minor)",
  113. "problemEN": "All US BUS, SPUR, LOOP highways and State Highways (except BUS, SPUR, LOOP) should be at least Minor Highway type",
  114. "solutionEN": "Change the road type to Minor Highway",
  115. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  116. "regexp": "/^[1-9][^2-5]:.*#((State Hwy |SR-|SH-|IL-|IN-|K-|LA-|M-|MA-|MO-|MS-|NC-|ND-|NJ-|NV-|NY-|SC-|SD-|TN-|VT-|WIS-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*|(US Hwy |US-)[0-9]+( BUS| LOOP| SPUR)+( [NSWE])?)@/i"
  117. },
  118. "136.solutionLink": "W:Road_types/USA#Minor_Highway",
  119. "137.enabled": true,
  120. "137.params": {
  121. "titleEN": "Wrong road type (primary)",
  122. "problemEN": "All State BUS, SPUR, LOOP Highways should be at least Primary Street type",
  123. "solutionEN": "Change the road type to Primary Street",
  124. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  125. "regexp": "/^[1-9][^1-5]:.*#(State Hwy |SR-|SH-|IL-|IN-|K-|LA-|M-|MA-|MO-|MS-|NC-|ND-|NJ-|NV-|NY-|SC-|SD-|TN-|VT-|WIS-)[0-9]+( BUS| LOOP| SPUR)+( [NSWE])?@/i"
  126. },
  127. "137.solutionLink": "W:Road_types/USA#Primary_Street",
  128. "138.enabled": true,
  129. "138.params": {
  130. "titleEN": "Wrong banner abbreviation",
  131. "problemEN": "Banner abbreviation may be incorrect. Abbreviations ALT, BUS, BYP, CONN, LOOP, and SPUR should be in ALL CAPS",
  132. "solutionEN": "Change banner abbreviation to ALT, BUS, BYP, CONN, LOOP, SPUR, or TRUCK",
  133. "template": "${street}#${altStreet[#]}",
  134. "regexp": "/[0-9]+[A-Z]? ([Aa]lt(ernate)?|[Bb](us(iness)?|yp(ass)?)|[Cc]onn(ector)?|[Ll]oop|[Ss]pur|[Tt]ruck)/"
  135. },
  136. "138.solutionLink": "W:Road_names/USA#United_States_Numbered_Highways",
  137. "139.enabled": true,
  138. "139.params": {
  139. "titleEN": "Improper Cardinal Usage",
  140. "problemEN": "This name contains a cardinal direction (NEWS) which does not match wiki guidelines.",
  141. "solutionEN": "If this cardinal should be spoken as a direction by TTS, make sure it has space on either side of it. \n\ If this cardinal should be spoken by TTS as a letter, follow it with a period. \n\ All cardinals should be capitalized.",
  142. "template": "${street} ${altStreet[#]}",
  143. "regexp": "/(^| )([NEWS]?[news][NEWS]?|[\"']?([NnSs][EeWw]?|[EeWw])['\":-]|[\"']([NnSs][EeWw]?|[EeWw])['\":-]?)(\\b|\\d| |$)/"
  144. },
  145. "139.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations",
  146. "171.params": {
  147. // {string} regular expression to match incorrect abbreviations
  148. "regexp": "/\\.$/",
  149. },
  150. //Freeway lock
  151. "150.enabled": true,
  152. "150.params": {
  153. // {number} minimum lock level
  154. "n": 4,
  155. },
  156. //Major Highway lock
  157. "151.enabled": true,
  158. "151.params": {
  159. // {number} minimum lock level
  160. "n": 3,
  161. },
  162. //Minor Highway lock
  163. "152.enabled": true,
  164. "152.params": {
  165. // {number} minimum lock level
  166. "n": 3,
  167. },
  168. //Ramp lock
  169. "153.enabled": true,
  170. "153.params": {
  171. // {number} minimum lock level
  172. "n": 2,
  173. },
  174. //Primary Street lock
  175. "154.enabled": true,
  176. "154.params": {
  177. // {number} minimum lock level
  178. "n": 2,
  179. },
  180. //Default US checks
  181. "24.enabled": !0,
  182. "25.enabled": !0,
  183. "27.enabled": !0,
  184. "34.enabled": !0,
  185. "35.enabled": !0,
  186. "38.enabled": !0,
  187. "39.enabled": !0,
  188. "43.enabled": !0,
  189. "48.enabled": !0,
  190. "78.enabled": !0,
  191. "87.enabled": !0,
  192. "90.enabled": !0,
  193. "106.enabled": !0,
  194. "107.enabled": !0,
  195. "108.enabled": !0,
  196. "109.enabled": !0,
  197. "112.enabled": !1,
  198. "118.enabled": !0,
  199. "116.enabled": !0,
  200. "119.enabled": !0,
  201. "120.enabled": !0,
  202. "121.enabled": !0,
  203. "172.enabled": !0,
  204. "173.enabled": !0,
  205. "190.enabled": !0,
  206. "192.enabled": !0,
  207. "170.enabled": !0,
  208. "170.params": {
  209. regexp: "/^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/"
  210. },
  211. "171.enabled": true,
  212. "171.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations",
  213. "171.params": {
  214. "regexp": "/((?!(\\bPhila|\\bPenna|.(\\bWash|\\bCmdr|\\bProf|\\bPres)|..(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|...(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|...(#| )[NEWSR])).{5}\\.|((?!(hila|enna|(\\bWash|\\bCmdr|\\bProf|\\bPres)|.(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|..(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|..(#| )[NEWSR])).{4}|(\\bhila|\\benna))\\.|((?!(ila|nna|(ash|mdr|rof|res)|(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|.(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|.(#| )[NEWSR])).{3}|\\b(ila|nna|ash|mdr|rof|res))\\.|((?!(la|na|(sh|dr|of|es)|(dm|te|pl|aj|gt|e[vc]|\\.R|ov|en|on|pl)|(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|(#| )[NEWSR])).{2}|\\b(la|na|sh|dr|of|es|dm|te|pl|aj|gt|e[vc]|\\.R|ov|en|on|pl))\\.|(#|^)[^NEWSR]?\\.)|(((?!\\b(D|O|L)).|#|^)\'(?![sl]\\b)|(#|^)\'s|(?!\\b(In|Na)t).{3}\'l|(#|^).{0,2}\'l)|(Dr|St)\\.(#|$)|,|;|\\\\|((?!\\.( |#|$|R))\\..|(?!\\.( .|#.|$|R\\.))\\..{2}|\\.R(#|$|\\.R))|[Ee]x(p|w)y\\b|Tunl\\b|Long Is\\b|Brg\\b/",
  215. "problemEN": "The street name has incorrect abbreviation, or character",
  216. "solutionEN": "Check upper/lower case, a space before/after the abbreviation and the accordance with the abbreviation table. Remove any comma (,), backslash (\\), or semicolon (;)"
  217. },
  218. };

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址