Is there a spell checker in vespa - spell-checking

Is there a spell checker in vespa. I want to show suggestions, if the user enters a wrong keyword. A few google searches hinted at query rewriters. How can it be configured and used?

There is no built-in spellchecker in Vespa. There is a query rewriting feature described here https://docs.vespa.ai/documentation/query-rewriting.html but it's based on pre-defined rules. Your best option is to integrate with a spellchecker like http://hunspell.github.io/ in a custom searcher, see https://docs.vespa.ai/documentation/searcher-development.html.

Related

What is the meaning of 'cimode' in react-i18next and why isn't it properly documented?

I started using react-i18next a few days ago and I am very satisfied with it. However, I've been seeing this 'cimode' language here and there, in some posts and while debugging, but have no clue what it means. I've searched all over, I believe, and can't find any documentation on it.
In my particular case, I am generating some boilerplate code in a new website and created a demo page to show how to use localization in the website. I am generating toggle language buttons from the languages I set on the whitelist and, to my surprise, I have a 'cimode' button. I know I can filter it out and I will, but I would like to know what it should be used for and maybe to see better documentation for it in https://react.i18next.com/.
From my understanding, CIMODE is used for testing to consistently return the translation key instead of the variant value.
It seems rather hidden on the FAQ.

Can Intellij IDEA (14 Ultimate) generate regex based TODO-comments?

A few years back i worked in a company where i could press CTRL+T and a TODO-comment was generated - say my ID to be identified by other developers was xy45 then the generated comment was:
//TODO (xy45):
Is something available from within Intellij 14 Ultimate or did they write their own plugin for it?
What i tried: Webreserach, Jetbrais documentations - it looks like its not possible out of the box (i however ask before i write a plugin for it) or masked by the various search results regarding the TODO-view (due to bad research skills of mine).
There is no built-in feature in IntelliJ IDEA to generate such comments, so it looks like they did write their own plugin.
Found something that works quite similar but is not boundable to a shortcut:
File -> Settings -> Live Templates
I guess the picture says enoth to allow customization (consult the Jetbrains documentation for more possibilities). E.g. browse to the Live Template section within the settings, add a new Live Template (small green cross, upper right corner in the above picture) and set the context where this Live Template is applicable.
Note: Once you defined the Live Template to be applicable within Java (...Change in the above image where the red exclamation marks are shown) context you can just type "t", "todo" and hit CTRL+Space (or the shortcut you defined for code completion).
I suggest to reconsider using that practice at all. Generally you should not include redundant information which is easily and more reliably accessible through your Version Control System (easily available in Idea directly in editor using Annotate feature). It is similiar to not using javadoc tag #author as the information provided with it is often outdated inaccurate and redundant. Additionaly, I don´t think author of TODO is that much valuable information. Person who will solve the issue will often be completly different person and the TODO should be well documented and descriptive anyway. When you find your own old TODO, which is poorly documented, you often don't remember all the required information even if you were the author.
However, instead of adding author's name, a good practice is to create a task in you issue management system and add identifier of this task to the description of the todo. This way you have all your todos in evidence at one place, you can add additional information to the task, track progress, assign it etc. My experience is that if you don´t use this, todos tend to stay in the code forever and after some time no one remembers clearly the details of the problem. Additionaly, author mentioned in the todo is often already gone working for a different company.
Annotated TODO with issue ID

How to give proper syntax in webdriver?

I'm able to automate using webdriver but there are few syntax like
driver.manage().setscriptTimeout(100, Seconds);
(copied from other site). How to know that after manage(), setscriptTimeout() follows?
That means how to predict correct methods for timeouts or something like that in webdriver.
Copy paste can be done, but few companies doesn't prefer copy paste job, they need genuine testers who can put the syntax in brain. Please let me know how to master syntax.
What language are you using? An IDE such as IntelliJ (Java), Rubymine(Ruby), Visual STudio(C#), etc. will give you auto complete (also known as Intellisense)

Lucene 4.1 : How search text with HunspellStemmer and get suggestions?

I want to parse text files with lucene using HunspellStemmer to check for spelling errors. I will use Hunspell dictionaries that's why I want to use HunspellStemmer.
At this point I'm not sure how I should parse the files and do the checking.
Could I use a Standard Analyser with WordFilter to index the text in a file and check Term by term if the keyword is present in HunspellDictionary.
I did that and it works, not sure it's the optimal solution, but if I want to output 3-5 suggestions by word not present, I have no idea what do to.
I could use a IndexerSearch when I use a PlainTextDictionnary, but no idea how to get that functionality with HunspellDictionary. (it doesn't implement Dictionary).
any help will be really appreciate.
thanks
examples that I want to check : hell, hello, hall, helli. I'm hoping to have suggestions for "helli" using a Hunspell.

How can my own implementation of Find References write to the Eclipse Search View?

I am using the Eclipse plugin framework to write an editor for a specific language. I would like to implement a Find Reference capability for this language and write the results to the eclipse Search View. I've been searching the web for a few days now, and all I found was explanations on how the define the org.eclipse.search.searchResultViewPages extension point and define a search page and a search view. I am only interested in the Search View and how I can plug in my own results to it.
Thanks!
I have started to work on the same problem.
For me, the easiest thing to do was to add a command handler for the existing Java find references command org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace when in the context of my editor.
The current version of my handler is very simple, and it sends a regular expression based on the current word to a simple text search (admittedly, producing false positives). On the plus side, the results get plugged into the search results as you would like, and I didn't have to deal with search views.
The important thing seems to be that your handler end with a call like this:
NewSearchUI.runQueryInBackground(query);
In order to prepare my simple text query, I use
ISearchQuery query = TextSearchQueryProvider.getPreferred().createQuery(new PigSearchInput(word));
You can look at my complete handler class here. It's mostly self contained. In the future I plan on implementing a "real" find references feature,, using my own classes instead of the Eclipse text search ones, but I haven't done this yet.