fuzzy-search

Python fuzzy search and replace

半腔热情 提交于 2019-12-13 19:35:36
问题 I need to perfom fuzzy search for sub-string in string and replace that part. For example: str_a = "Alabama" str_b = "REPLACED" orig_str = "Flabama is a state located in the southeastern region of the United States." print(fuzzy_replace(str_a, str_b, orig_str)) # fuzzy_replace code should be implemented # Output: REPLACED is a state located in the southeastern region of the United States. The search itself is simple with fuzzywuzzy module, but it gives me only ratio of difference between

Edit distance: Ignore start/end [closed]

心已入冬 提交于 2019-12-13 09:18:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I am looking for an algorithm that does edit distance, but which will ignore start+end in the one string and white space: edit("four","foor") = 1 edit("four","noise fo or blur") = 1 Is there an existing algorithm for that? Maybe even a Perl or a Python Library? 回答1: The code to do this is simple in concept. It's

How to query Elastic with Spring-data-elastic

做~自己de王妃 提交于 2019-12-12 19:19:01
问题 I am new to Elastic and spring-data-elastic. I am been searching here and other areas of the web, but so far have been unable to find the answer to my question. I am hoping SO might be able to help. I am indexing some records from my Users table (firstName, lastName) and I am looking to be able to allow advanced searching. So for example if I have the name 'Frances' and I enter 'Frank' then the system is smart enough to return the record. Same for 'Robinson' and 'Robinsen', etc. I've setup my

DoubleMetaphoneFilterFactory in Solr

佐手、 提交于 2019-12-12 14:51:33
问题 My purpose is to integrate solr so that the results returned from my application are accurate and fast. I am performing the search over name field using doublemetaphonic so that the names that sound similar are also captured then using the fuzzy search(That uses levenshtein distance algorithm) fetch the results above certain percentage.The problem is when I put the doublemetaphonic on the feild type name then I am unable to perform fuzzy search over that field. The example configuration from

fuzzy search with lucene

人走茶凉 提交于 2019-12-12 08:50:05
问题 I implemented a fuzzy search with lucene 4.3.1 but i'm not satisfied with the result. I would like to specify a number of results it should return. So for example if I want 10 results, it should return the 10 best matches, no matter how bad they are. Most of the time it returns nothing if the word I search for is very different from anything in the index. How can I achieve more/fuzzier results? Here the code I have: public String[] luceneQuery(String query, int numberOfHits, String path)

Can anyone improve on the below Fuzzyfind function for VBA?

馋奶兔 提交于 2019-12-12 03:46:19
问题 This function lets you find similar strings from a range without having to do an exact search. The formula looks like this: =FuzzyFind(A1,B$1:B$20) assuming the string you are performing a search for is in A1 and your reference or options table is B1:B20 The code is here: Function FuzzyFind(lookup_value As String, tbl_array As Range) As String Dim i As Integer, str As String, Value As String Dim a As Integer, b As Integer, cell As Variant For Each cell In tbl_array str = cell For i = 1 To Len

MySQL SubString Fuzzy Search

前提是你 提交于 2019-12-12 02:09:50
问题 I have a very interesting problem: I have a MySQL table 'Venue' with fields: 'name', 'addressLine1', 'addressLine2', 'addressLine3', 'city', 'country', 'description'; all fields are VARCHAR. 'description' is a larger text field. What I would like to do is a fuzzy search on table Venue. So far I am using: SELECT * FROM Venue WHERE MATCH(name, addressLine1,..., description) AGAINST("London" IN NATURAL LANGUAGE MODE). I can also sort this query based on the MATCH score. This is great but has

Solr - fuzzy search issue with PatternTokenizer Factory

一曲冷凌霜 提交于 2019-12-11 19:17:43
问题 I'm using Solr4.2 in my application. I have changed my text field definition to use the Solr.PatternTokenizerFactory instead of Solr.StandardTokenizerFactory , and changed my schema definition as below <fieldType name="text_token" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.PatternTokenizerFactory" pattern="[^a-zA-Z0-9&\-']|\d{0,4}s:" /> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements

Transliteration and fuzzy search, like Google suggestions

拜拜、爱过 提交于 2019-12-11 18:58:05
问题 I need to do a fuzzy search with transliteration of the characters, for example: I have an ASP.NET application, database, which has a table with a list of Spanish words (200,000 entries), I also have a page with an input field. The point is that I do not know Spanish, and I do not know how to spell a search word in Spanish, but I know how it sounds. Therefore, in the text box I enter the search word, such as "beautiful", but in the recording err - "prekieso", and I need to get from the

Why can I run SSIS Fuzzy Grouping from Visual Studio but not the deployed package?

一世执手 提交于 2019-12-11 05:55:08
问题 I have written an SSIS package to create a Fuzzy Grouping. I can run it from Visual Studio targeting any of my servers and it will run without any problem. If I try to run the dtsx by remoting to any of those servers, I get the PRODUCTLEVELTOLOW error when the Fuzzy Grouping component executes. I'm running SQL Server 2005 Standard on all servers. I've read that SQL Server 2005 Enterprise is necessary to make use of Fuzzy Grouping and some other components. That fits with the error message,