ArticleslgStudy

computer science

Proximity search (text)

Proximity search (text) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Proximity search (text) rather than just read about it. In short: In text processing, a proximity search looks for documents where two or more separately matching term occurrences are within a specified distance, where distance is the number of intermediate words or characters. In addition to proximity, some implementations may also impose a constraint on the word order, in that the order in the searched text must be identical to the order of the search query.

Key takeaways

  • Proximity search (text) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Proximity search (text) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Proximity search (text) from memory before moving on to harder problems.

Reference excerpt

In text processing, a proximity search looks for documents where two or more separately matching term occurrences are within a specified distance, where distance is the number of intermediate words or characters. In addition to proximity, some implementations may also impose a constraint on the word order, in that the order in the searched text must be identical to the order of the search query. Proximity searching goes beyond the simple matching of words by adding the constraint of proximity and is generally regarded as a form of advanced search. For example, a search could be used to find "red brick house", and match phrases such as "red house of brick" or "house made of red brick". By limiting the proximity, these phrases can be matched while avoiding documents where the words are scattered or spread across a page or in unrelated articles in an anthology.

Rationale The basic linguistic assumption of proximity searching is that the proximity of the words in a document implies a relationship between the words. Given that authors of documents try to formulate sentences which contain a single idea, or cluster of related ideas within neighboring sentences or organized into paragraphs, there is an inherent, relatively high, probability within the document structure that words used together are related. On the other hand, when two words are on the opposite ends of a book, the probability of a relationship between the words is relatively weak. By limiting search results to only include matches where the words are within the specified maximum proximity, or distance, the search results are assumed to be of higher relevance than the matches where the words are scattered. Commercial internet search engines tend to produce too many matches (known as recall) for the average search query. Proximity searching is one method of reducing the number of pages matches, and to improve the relevance of the matched pages by using word proximity to assist in ranking. As an added benefit, proximity searching helps combat spamdexing by avoiding webpages which contain dictionary lists or shotgun lists of thousands of words, which would otherwise rank highly if the search engine was heavily biased toward word frequency.

Boolean syntax and operators Note that a proximity search can designate that only some keywords must be within a specified distance. Proximity searching can be used with other search syntax and/or controls to allow more articulate search queries. Sometimes query operators like NEAR, NOT NEAR, FOLLOWED BY, NOT FOLLOWED BY, SENTENCE or FAR are used to indicate a proximity-search limit between specified keywords: for example, "brick NEAR house".

Usage in commercial search engines

In regards to implicit/automatic versus explicit proximity search, as of November 2008, most Internet search engines only implement an implicit proximity search functionality. That is, they automatically rank those search results higher where the user keywords have a good "overall proximity score" in such results. If only two keywords are in the search query, this has no difference from an explicit proximity search which puts a NEAR operator between the two keywords. However, if three or more than three keywords are present, it is often important for the user to specify which subsets of these keywords expect a proximity in search results. This is useful if the user wants to do a prior art search (e.g. finding an existing approach to complete a specific task, finding a document that discloses a system that exhibits a procedural behavior collaboratively conducted by several components and links between these components). Web search engines which support proximity search via an explicit proximity operator in their query language include Walhello, Exalead, Yandex, Yahoo!, Altavista, and Bing:

When using the Walhello search-engine, the proximity can be defined by the number of characters between the keywords. The search engine Exalead allows the user to specify the required proximity, as the maximum number of words between keywords. The syntax is (keyword1 NEAR/n keyword2) where n is the number of words. Yandex uses the syntax keyword1 /n keyword2 to search for two keywords separated by at most n − 1 {\displaystyle n-1} words, and supports a few other variations of this syntax. Yahoo! and Altavista both support an undocumented NEAR operator. The syntax is keyword1 NEAR keyword2. Google Search supports AROUND(#). Bing supports NEAR. The syntax is keyword1 near:n keyword2 where n=the number of maximum separating words. Ordered search within the Google and Yahoo! search engines is possible using the asterisk (*) full-word wildcards: in Google this matches one or more words, and an in Yahoo! Search this matches exactly one word. (This is easily verified by searching for the following phrase in both Google and Yahoo!: "addictive * of biblioscopy".) To emulate unordered search of the NEAR operator can be done using a combination of ordered searches. For example, to specify a close co-occurrence of "house" and "dog", the following search-expression could be specified: "house dog" OR "dog house" OR "house * dog" OR "dog * house" OR "house * * dog" OR "dog * * house".

See also Compound term processing Edit distance Information retrieval Search engine Search engine indexing - how texts are indexed to support proximity search Semantic proximity

Notes

Worked examples

Example 1 — a first encounter with Proximity search (text)

Start with the simplest possible case. Write down what Proximity search (text) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Proximity search (text) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Proximity search (text) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Proximity search (text)

In research
Proximity search (text) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Proximity search (text) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Proximity search (text) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Information retrieval techniques, Internet search algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Proximity search (text) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Proximity search (text)” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Proximity search (text) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Proximity search (text) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Proximity search (text) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Proximity search (text) in simple terms?

In text processing, a proximity search looks for documents where two or more separately matching term occurrences are within a specified distance, where distance is the number of intermediate words or characters. In addition to proximity, some implementations may also impose a constraint on the wor…

Why does Proximity search (text) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Proximity search (text)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Proximity search (text).

Tags

  • Information retrieval techniques
  • Internet search algorithms

Keep exploring