2.X/3. Dealing with Human Language

3-7. Typoes and Mispelings

drscg 2017. 9. 24. 12:33

We expect a query on structured data like dates and prices to return only documents that match exactly. However, good full-text search shouldn’t have the same restriction. Instead, we can widen the net to include words that may match, but use the relevance score to push the better matches to the top of the result set.

날짜나 가격 같은, 구조화된 데이터에 대한 query는 정확히 일치하는 document만 반환하기를 기대한다.그러나, 좋은 full-text 검색은 동일한 제한을 가지고 있지 않다. 대신, 일치할 수도 있는 단어를 포함하도록 검색 범위를 넓힐 수는 있다. 그러나, 결과의 상단에 더 잘 일치하는 것을 넣기 위하여, relevance score를 사용한다.

In fact, full-text search that only matches exactly will probably frustrate your users. Wouldn’t you expect a search for "quick brown fox" to match a document containing "fast brown foxes", "Johnny Walker" to match "Johnnie Walker" or "Arnold Shcwarzenneger" to match "Arnold Schwarzenegger"?

사실, 정확하게 일치하는 full-text 검색은 아마도 사용자들에게 불편을 줄 것이다. "quick brown fox" 에 대한 검색은 "fast brown foxes" 를 포함하는 document에, "Johnny Walker" 는 "Johnnie Walker" 에, "Arnold Shcwarzenneger" 는 "Arnold Schwarzenegger" 에 일치하기를 기대하지 않겠는가?

If documents exist that do contain exactly what the user has queried, they should appear at the top of the result set, but weaker matches can be included further down the list. If no documents match exactly, at least we can show the user potential matches; they may even be what the user originally intended!

사용자가 검색한 것을 정확히 포함하는 document가 존재한다면, 그것은 결과의 상단에 나타날 것이다. 그러나 덜 일치하는 것은 목록의 더 아래에 포함될 것이다. 정확히 일치하는 document가 없다면, 최소한 잠재적으로 일치할 수 있는 document를 사용자에게 보여줄 것이다. 이것이 사용자의 원래 의도일 수도 있다.

We have already looked at diacritic-free matching in Normalizing Tokens, word stemming in Reducing Words to Their Root Form, and synonyms in Synonyms, but all of those approaches presuppose that words are spelled correctly, or that there is only one way to spell each word.

이미 Normalizing Tokens에서 발음 구별 부호에 관계없는 일치를, Reducing Words to Their Root Form에서 단어의 형태소 분석을, Synonyms에서 동의어를 살펴본 바 있다. 그러나, 이런 방법은 단어의 맞춤법이 올바르다거나, 각 단어를 맞춤법에 맞게 하는 방법이 있다는 것을 전제로 하고 있다.

Fuzzy matching allows for query-time matching of misspelled words, while phonetic token filters at index time can be used for sounds-like matching.

fuzzy 일치는, 검색 시에, 맞춤법이 틀린 단어의 일치를 가능하게 하고, 반면에, 색인 시의 phonetic token filter는 비슷하게 들리면(sounds-like) 일치하게 하는데 사용될 수 있다.

'2.X > 3. Dealing with Human Language' 카테고리의 다른 글

3-6-5. Multiword Synonyms and Phrase Queries  (0) 2017.09.24
3-6-6. Symbol Synonyms  (0) 2017.09.24
3-7-1. Fuzziness  (0) 2017.09.24
3-7-2. Fuzzy Query  (0) 2017.09.24
3-7-3. Fuzzy match Query  (0) 2017.09.24