Note that there are some explanatory texts on larger screens.

plurals
  1. POtip needed to find semantic value of blocks inside strings
    primarykey
    data
    text
    <p>I have a problem, and besides it sounds trivial, it's not simple (for me) to find a straight forward, scalable and performatic solution. I have one input text where the website user can search for locations.</p> <p>Today the location can be a city, a address in a city or a neighborhood in a city, and the user must separate the address or the neighborhood from the city using a comma, then it's easy for me to split the string and find if the first block is a address, a neighborhood or a city. If the user fails to fill the input with all the needed information, putting a address without a city, and I match more than a street with the same name, we show all the locations for him to choose the correct one.</p> <p>Using the search log we find out that most of the users don't use the comma, even with all the tool tips pointing how to use the location search (thx google :p).</p> <p>So, a new requirement for the location search is needed, to accept non comma separated addresses, like:</p> <pre><code>1. "5th Avenue" 2. "Manhattan" 3. "New York" 4. "5th Avenue Manhattan" 5. "5th Avenue Manhattan New York" 6. "Manhattan New York" 7. "5th Avenue New York" </code></pre> <p>But I can't find a way to find the meaning of each block or a dynamic way to make this work. Ie, if I get a string like "New Yok", "new" can be a address, and "york" can be a city.</p> <p>My question is, is there some kind of technique or framework to achieve what I need or I will need to work my way in a algorithm (based on the number of words, commas, etc) to do that specifically?</p> <p>Edit1:</p> <p>Because I use SQL Server, I'm thinking about full text search multiple columns search, doing a exact match before and a non exact later. But I think some incomplete addresses will return thousands of rows.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload