places().length for two cities name with spaces equal to 1
See original GitHub issueHi,
I think i found a new issues.
So two cities name like “stockholm warsaw” equal to 1. if it’s two cities name like “stockholm to warsaw” it will be equal to 2. Why the “to” needed, nlp was not human, the result should be the same like the second example.
thanks
my current fix for now,
var foundTo = text.search("to");
console.log("FOUND TO"+foundTo);
if(foundTo == -1){
text = text.replace(/ /," to ");
}
it will replace the first space with “to”.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Query the two cities in STATION with the shortest and longest ...
Query: Query the 2 cities contained in STATION table with the shortest and longest CITY names, as well as their respective lengths (i.e.:...
Read more >How do we define cities, towns, and rural areas?
Driven by population size and density. Population size is used by more than half of the national definitions of urban and rural areas....
Read more >Single source shortest path between two cities - GeeksforGeeks
The task is to find the cheapest cost path from given source to destination from K stops. Examples: Input: N = 3, edges...
Read more >Models of Urban Structure
When a country has two large cities of similar size in separate regional areas; the rank-size rule may apply regionally –– as in...
Read more >List of long place names - Wikipedia
This is a list of long place names. Contents. 1 Single-word names. 1.1 25 letters or more; 1.2 20-24 letters; 1.3 14–19 letters....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to make sure you understand. The “CityA CityB” should equal to 2 like on “CityA to CityB”.
So, “CityA CityB” length = 2 “CityA to CityB” length = 2
Thanks
Yeah, Looks like it still failing on certain circumstances, especially places added with lexicon. Will post the full log if i have time. Thank you so much for your effort.