Skip to content

Commit

Permalink
Attempt to disambiguate national roads vs street numbers on crossroad…
Browse files Browse the repository at this point in the history
…s ( attempt to address carrismetropolitana/gtfs#236 )
ricardojorgerm authored Mar 20, 2024
1 parent 7bdb773 commit 33236d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/makeTTS.js
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ module.exports = (p, modes = {}) => {
regex = /([^X])\)([^\s])/giu;
thisString = thisString.replace(regex, '$1 ) $2');
/* Add spaces around road numbers */
regex = /(^|\()[\s]*N[ac\s]?((\d)+)([\s\-\(\)]|$)/giu;
regex = /(^|\(|\sX)[\s]*N[ac\s]?((\d)+)([\s\-\(\)]|$)/giu;
thisString = thisString.replace(regex, '$1Estrada Nacional $2 ');
regex = /\bN([\d]{3})-(\d)\b/giu;
thisString = thisString.replace(regex, ' Estrada Nacional $1 $2 ');

0 comments on commit 33236d2

Please sign in to comment.