What is the best approximation algorithm to implement full-text fuzzy search. For example we have a dropdownlist with the following data (from SQL datasource):
Company Policy
Product Catelog
Our Partners
Now I want to replace it with an autocomplete textbox, such that when the letter "p" is typed the list shows all three results. It should start matching the first letter of the first word or second word and so on. Also, it should highlight or make the matched letters bold in the suggestions dropdown.
Is there a readymade control for ASP.NET (with JS or jQuery) to deliver all the aforementioned functionality? Otherwise if I have to implement it, is there a tutorial/blog which point me in the right direction?
I believe this is what you're looking for.
It's jquery ui it has the autocomplete functionality described.
check out this one, I used it and works very well
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx
Related
The forms I want to use in form recognizer have several checkboxes. Currently, form recognizer's OCR engine doesn't seem to detect checkboxes. Is there a work-around for this, or is there a way to train checkbox recognition?
I've also tried using tesseract on windows and linux, but I couldn't solve it there either.
The checkboxes are your standard open squares. Sometimes they may have an "x" or checkmark on them.
If there is no solution, then I may ask the customer to change from checkboxes to filled in circles (radio-buttons). I haven't tested that yet, to see what OCR would make of them.
Edit: I read the form recognizer documentation and I saw that it explicitly says checkboxes and radio buttons are not supported. I wonder if anyone has a awork-around?
An OCR is by definition made for "character recognition" (see here). A checkbox or a radio button is not a character, so it will not be recognized by an OCR.
You can still give a try to a custom vision detector to find those items, but it will be a bit complicated as this service will only find those items in your document and you will have to combine with an OCR call to get the text, then try to match the zones in the document to know which text is associated with which combo/radio button
Support for checkboxes was added to Form Recognizer in version 2.1 (in public preview as of September 2020). From the announcement:
Checkbox / Selection Mark detection – Form Recognizer supports
detection and extraction of selection marks such as check boxes and
radio buttons. Selection Marks are extracted in Layout and you can now
also label and train in Train Custom Model - Train with Labels to
extract key value pairs for selection marks.
There is now a selectionMarks object in the Get Analyze Layout Result API response that lists detected selection marks and their state, either selected or unselected.
Support for labeling checkboxes and selection marks was also added to the sample labeling tool as of version 2.1.
In Form Recognizer if the forms have a consistent layout, you might be able to tag the area using the new GUI tool and pass that specific area to OCR to try to improve results.
The method #Ram-msft suggested can work, but I find that the recognizer struggles to consistently pick out any single characters in a box - although to be honest checkbox type boxes seem to work better than say a number in a box (in my experience at least).
As long as you're interested in any "value" inside the box (i.e. it's not empty) then that method should give you reasonable results until they come up with a true solution.
In bootstrap-table jquery (http://issues.wenzhixin.net.cn/bootstrap-table/)
How do I search with the "&" keyword, e.g I want food & drink.
However, when read the source code, it has .replace for /&/ to &. Any idea I can bypass this? It is impossible to ask user to key in & in the search text box.
So... im still a little unclear as there is no bug in core code.
See this fiddle which proves "&" search works fine:
http://jsfiddle.net/dabros/x8efv6wf/1/
If this somehow doesnt answer your needs, elaborate on exactly why.
Then look at some extensions like multiple search, filter and filter-control:
http://bootstrap-table.wenzhixin.net.cn/extensions/
If still not happy, then create a custom search function. Easy to do if using server-side pagination, but possible even if client-side.
If you fixed on using client-side (not server side pagination + search, meaning that the js does the search, not your own server code) then look at custom search.
Relatively new feature i think, not used it myself as if i wanted a custom search i would use server-side code.
But here it is:
Custom search function #1956
https://github.com/wenzhixin/bootstrap-table/issues/1956
How to search within row details? #2007
https://github.com/wenzhixin/bootstrap-table/issues/2007
https://github.com/wenzhixin/bootstrap-table/pull/1979
That pull requests seems most detailed, it appears full example still otw, but shouldnt be hard if you read through there.
Though frankly, stick with plugins/extensions i listed above or use server-side code if still not happy - gives you far greater control with far simpler execution/code-maintenance.
I want to take the language known by a user. A person can know multiple languages. I want that when a user press "E" then the languages that have "E" as their starting letter are displayed below textbox and user is forced to select the value from the displayed values and secondly I want to take multiple languages.
This is just like when question is asked on stackoverflow.com while selecting the tags.
Rough first answer: look at the Ajax Control Toolkit:
http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/
You want to use the AutoCompleteExtender. There are really good samples on the web.
Ajax or jQuery will help you in this issue not sql
Is there any reliable way to check if user has entered Arabic words into a form and tries to submit it? Can Javascript handle this? Or, only server script like .NET can do this?
I'm thinking that if possible the script should directly prevent the user from inputting Arabic words into the form and show an alert pop up.
Please share any examples if you have any idea how to do it.
Thanks
In Unicode, Arabic characters fall in a specific range. You can use a regular expression in JavaScript to check if a string contains any characters in that range. (You could also do that in c#.) Here's a really helpful tool that will let you select the ranges you want to search for and create a JS-compatible regex for that.
For example, [\u0600-\u06FF\u0750-\u077F] will match any characters that fall in the Unicode ranges for "Arabic" and/or "Arabic Supplement".
You could use the Google Ajax Language API to detect this. Here is an example.
I'm using jQuery, ASP.NET, SQL Server, and the other usual suspects to design a company CRM. After they put in contact info, notes, dates, places and so forth they have to be able to select many different people to be "CC'ed." A group of people will be required to be one either "CC'ed" or "ToDo." The rest of the people can be nothing or "CC" or "ToDo." Currently we have it set up as a huge databind to templates with radio buttons for each option. Looks like shit. Anyone have any suggestions? I'd like to use a template with a datasource and have a good way to retrieve their answers and use them.
I'm leaning jQuery direction but like I said I'll need there to be up to 3 possible options for the people. This is going to be all opinion so I'm just looking for options.
Just to re-clarify, this concept is similar to email but I don't want them to have to type anything in as it is a set group of names that they're allowed to select from.
Looking for quick simple and pretty. somewhere in the range of 120 names.
If you intend to look down the jQuery route, I suggest that this widget could possibly help you out (even if only for inspiration sakes). http://quasipartikel.at/multiselect/
I'm struggling to "visualize" your form for terms of "real-estate expendature" etc.
Not directly what you are looking for, but this plugin may help
http://devgrow.com/slidernav-jquery-plugin/
Typing with intellisense. Sorry - any graphical thing will look overloaded.
Or: A table with filter options on top (again, typing). THere simply is no other way.
What I would most likely do to achieve this is implement the auto filter pattern that you type in a text box a few letters of the name and then it would filter down all of the overall results to those containing that pattern. Then have a select all button that will let you check all of them, and then the user can manually uncheck a few instead of having to check all.
The other thing to do would be to offer some type of categorization of the data so that they could filter by category that would put people in probable groups that would want all them all together. Like IT, HR, Executive or something similar.