Questions tagged [phrase]

210 questions
2
votes
1 answer

Lucene multiphrasequery search with wildcard

I have been trying to do a lucene search query where entering "Foo B" would return "Foo Bar", Foo Bear, Foo Build" etc. but will not return a record with an ID of "Foo" and the word "Bar" in say its 'description' field. I have looked into…
Adam James
  • 3,833
  • 6
  • 28
  • 47
2
votes
2 answers

PHP Regex Key phrase matching

I have a text field where the user will enter comma separated keywords or key phrases, and the server will then use these values to check multiple bodies of text for matches. So basically what I need is to match an exact phrase, case insensitive,…
Zyyk Savvins
  • 483
  • 4
  • 8
  • 14
2
votes
3 answers

Proximity searching phrases with root expanders in Solr or ElasticSearch (especially websolr or bonsai.io)?

I'm trying to select a search tool for a large project, and I'd be interested to know if this use case was supported by Solr or ElasticSearch. My customers are interested in conducting relatively sophisticated boolean searching. One search that is a…
Jake
  • 809
  • 1
  • 8
  • 18
2
votes
2 answers

Give advantage to search by phrase in sort SOLR

Search query which I send to SOLR is: ?q=iphone 4s&sort=sold desc By default the search works great, but the problem appears when I want to sort results by some field for eg. sold - No. of sold products. SOLR finds all the results which have:…
tasmaniski
  • 4,767
  • 3
  • 33
  • 65
2
votes
6 answers

How to extract phrases and then words in a string of text?

I have a search method that takes in a user-entered string, splits it at each space character and then proceeds to find matches based on the list of separated terms: string[] terms = searchTerms.ToLower().Trim().Split( ' ' ); Now I have been given…
Rich
  • 2,164
  • 1
  • 25
  • 39
2
votes
1 answer

Solr: Phrase search when indexed phrase is shorter than the query

Is it possible to find a document if the indexed field is a part of the queried phrase? It it easy to find "Quick brown fox jumps over the lazy dog" when searching for "brown fox" or "lazy dog". But what if I need to do it vice versa? Here's my…
Alex Vayda
  • 6,154
  • 5
  • 34
  • 50
2
votes
4 answers

Search a string in text file and also its previous and next sentence

If I have a search criterion: She likes to watch tv Input file text.txt containing some sentences, e.g.: I don't know what to do. She doesn't know that it's not good for her health. She likes to watch tv but really don't know what to say. I don't…
icebox19
  • 493
  • 3
  • 6
  • 15
1
vote
2 answers

how to get voice wake-up on Android

I want to wake-up some function in the Android APP by saying "hello, Jack". As far as I know, there is a technology named "phrase spotting" to recognise a certain speech, e.g. "hello, Jack". but I have no idea to implement the "phrase…
Veelion Chong
  • 23
  • 1
  • 5
1
vote
1 answer

Efficiently selecting a title (the center of the cluster) for a cluster of strings

I have an (imperfectly) clustered string data, where the items in one cluster might look like this: [ Yellow ripe banana very tasty, Yellow ripe banana with little dots, Green apple with little dots, Green ripe banana - from the market, …
eve
  • 11
  • 1
1
vote
1 answer

Can someone assist me with a multi-word synonym problem in Lucene?

Simple synonyms (wordA = wordB) are fine. When the synonym is a phrase (wordA = wordB word C), then matching is hit-or-miss. I have a simple test case (it's delivered as an Ant project) which illustrates the problem. This test case uses the same…
TrevorN
  • 87
  • 10
1
vote
1 answer

Generating Trigrams with Gensim's Phraser Package in Python

I have the following code snippet which I created with the help of this tutorial for unsupervised sentiment analysis purposes: sent = [row for row in file_model.message] phrases = Phrases(sent, min_count=1, progress_per=50000) bigram =…
1
vote
1 answer

Remove sequential duplicates using regex (pipe delimited)

I have a pipe delimited list of phrases. I would like to remove sequential duplicates using a regex replace/substitution. For example: dog|cat|cat woman|cat woman|dog|dog cat|cat|catman|catman|catman|cat woman|cat woman|dog|dogman|doggy would be…
hwm.nem
  • 11
  • 1
1
vote
1 answer

Gensim phrases model vocabulary length does not correspond to amount of iteratively added documents

I iteratively apply the... bigram.add_vocab() method in order to update a... bigram = gensim.models.phrases.Phrases(min_count=bigramMinFreq, threshold=10.0) Gensim phrases model. With each iteration up to ~10'000…
1
vote
0 answers

Phrase (i18next Phrase In-Context Editor) implementation with Next.js

In my Next.js app, I have an i18n.config.js file in the root directory of my next.js app. Inside i18n.config.js there is a configuration that is exported via module.exports={...}. MyApp in _app.js is wrapped with that module. Now, I want to…
1
vote
2 answers

how to find frequency of a phrase (multiple token string) inside a document in java?

I want to find the frequency of a multiple-token-string or phrase inside a document. Its not the word/single-term frequency that I am looking for, its always will be multiple-term and the number of terms are dynamic ... ex : searching the frequency…
user430354
  • 51
  • 1
  • 4