Web Forms :: How To Search A Word For Spelling Correction In C#
Sep 16, 2010
How to search a word for spelling correction in c#. Below is the code which i used,
Its not working, for words less than three 5 letters.
public string _dictionary(string word)
{
string[] wordArray = new string[125896];
string reading;
int nwords = 0;
FileStream fs = new FileStream(@"C:Documents and Settingsharsha.limayeDesktopspelling.txt", FileMode.Open, FileAccess.Read);
StreamReader s = new StreamReader(fs);
while((reading=s.ReadLine())!=null)
{
if (reading == word)
return word;
char[] TextboxPos=reading.ToLower().ToCharArray();
char[] readingPos = new char[20];
readingPos = TextBox1.Text.ToLower().ToCharArray();
if (TextboxPos[0] == readingPos[0])
{
if(readingPos.Length<=5)
{
if (TextboxPos[1] == readingPos[1] && TextboxPos.Length-1 == readingPos.Length-1)//[readingPos.Length])// && TextboxPos[TextboxPos.Length-1] == readingPos[readingPos.Length - 1])
{
// return reading;
TextBox1.Text = "Search for " + reading + " instead of " + TextBox1.Text;
break;
}
}
else
{
if (TextboxPos[1] == readingPos[1]&& TextboxPos[2] == readingPos[2] && TextboxPos.Length == readingPos.Length && TextboxPos.Length-1 == readingPos.Length - 1&& TextboxPos.Length-2 == readingPos.Length - 2)
{
//return reading;
TextBox1.Text = "Search for" + reading + "instead of" + TextBox1.Text;
break;
}
}
}
wordArray[nwords] = reading;
nwords++;
}
fs.Close();
s.Close();
return reading;
View 1 Replies
Similar Messages:
Sep 14, 2010
i want implement spelling checker to check the spelling written in textbox is correct or not in c#.
i have a text file from where the soelling has been checked.
View 2 Replies
Dec 11, 2010
i want to search a text in the database even if user writes wrong spelling.
I am using LIKE operator. But I am not getting exact result.
For example: I want to search 'Norrebro' if user types 'Norebro' (wrong spelling)
LIKE operator does not work in this case. So how can I get the exact result??
View 1 Replies
Jan 27, 2010
I want a word search i doing the search like this , but it is giving character wherever there is in the string,if i give two character like ok it is searching for a full string where ever Ok is there select * from table1 where textfield like '%word%' this query would match word but also wordabc how can i make it aware of delimitions
View 3 Replies
Aug 23, 2010
I have a textbox and what I would like to implement is basically a situation similar to what you have in google when you type in a word. In otherwords,
in the textbox when you type in J, it should generate a list of names that starts with O in alphabetical order, then next when you type in o, so that now you have Jo, it should generate a list of names instead that now starts with Jo in alphabetical order, then again when you type in h, it should generate a list of names that starts with Joh and so on.
View 5 Replies
Mar 3, 2011
I can easily create a search that will allow a user to input a single word (or a portion of a single word) into a text box that will search a database column.
But what I want is for the user to be able to type two or three words into the textbox and produce results where just one of the words have to match the contents of the columns cell.
I don't need to be able to do a multi column or table search, and I'm using C# and MS Access.
I imagine this question would have been asked more than a couple of times - but I can't find a decent answer.
View 7 Replies
Feb 4, 2010
i have one multi line text box in my asp page.
while entering content to it , i want to high light the word by red underline if the spelling of word is not correct (just like in word)
i have to do it without using any button , instead while changing text.
View 5 Replies
Feb 13, 2010
i want to store a word documents (.doc) in the database and i need to provide search over a collection of Word documents and highlight the words too.
I m using VS2005 --> ASP.NET, C#.NET, SQL Server.
View 3 Replies
Nov 11, 2010
I am not that good in SQL syntax and need some help. I am trying to create some search functionality for my website. Basically it just has to search for product names. Now I have a simple statement like SELECT * FROM Products WHERE ProductName LIKE '%' + @ProdName + '%' This statement does not fit to my requirements.I have 2 issues:
1. Assuming someone searches for "blocks". The result that I get is product names with the word "blocks" in it, however I would also like to display results with product names the have the word "block" in it i.e without the "s" In short I want to match the possible product names from the keyword e.g block, blocks, blocking etc I dont want it to search the exact name but may be just partially. If the keyword contains the exact word from the product name, well and good but it should also display the products where the keyword is partially matching.
2. Assuming someone searches for the words "concrete blocks". I get the result with products that have the words "concrete blocks" only. But I would also like to get the result with say "Louvre Blocks" in the total results displayed.So can someone kindly help me sort out my issues. Sorry if im repeating words but im just trying to make an understandable point.
View 5 Replies
Dec 5, 2010
I've a problem with the listsearch extender.
My dropdownlist have serveral values with:
Companyname ----- City
Firstname ------- Lastname
The extender now search in the first word but is it possible to search also in the second word?
View 2 Replies
Oct 1, 2010
i have table contain two column id and word .word column may contain one word or two or three ex ( computer , computer software , computer software computer )i want search the text if it contain any word in that table .
View 2 Replies
Jun 9, 2010
I need to have search form in my web app . I want visitor input text in textbox control and when he click on Search button it check DB table for his input text.
I dould like if user input "Windows 7" and I have the sentence in DB Records as "My be Some Windows Generation .." it list this record.
in other word I want to search for any word that users entered in DB.
Could any one tell me efficient way instead of split input text to words and then execute search query per word?
View 3 Replies
May 31, 2010
I have text box ...If i type in textbox like
"C,C++,ASP.net,4-5Years" then every word should be checked by database whether that name exits or not in table field of the database..It should be check separately of every word ..It just like Search engin...How can i do in asp.net
View 1 Replies
Sep 15, 2010
I am developing the Home page of a Client. Apart from various things on this home page I have a text box and search button. Having said that, I have a database in which I have almost 12 tables with varying number of columns. Now my question is,Is there anyway to search a word typed by a user in the textbox to search it in all the tables(all columns) of the database.
View 2 Replies
Sep 17, 2010
How can I search a word in all the columns of a table?
View 4 Replies
Jul 30, 2010
how can i separate words in db column separated by enter key. I am entering data in a multi line textbox directly to db, and i want to search a word in that column. Since the words are seperated by enter key, how can i separate the words to search. If i use like i can't search the exact word is there..
View 2 Replies
Jun 21, 2013
How to multiple search in single textbox using autocomplete extender.. or may use an other method.Â
View 1 Replies
Sep 20, 2015
I need to search some words or text in word document through programming.
View 1 Replies
Feb 24, 2011
If I wanted to search a variable for the wrod "alert", what would be the syntax in javascript
View 2 Replies
Aug 17, 2010
I´m currently programming a web search application in ASP.Net and having problem with full text searching. My requirements are:
1. Save a byte array from SQL server to word document as a temp file in a server side?
2. How to highlight the string I am currently searching in the Word document and return to the user the sentence with the highlighted string (like on Bing or any other search engines)? Is it possible to fullfill this requirement with full-text search integrated in SQL Server 2008?
View 1 Replies
Sep 10, 2012
I am trying to export a gridview that is returned from a search form. The gridview also has paging enabled. In order to export the records from all pages in the gridview I had to turn off paging and do a databind, but instead of only exporting the search results it exports all the records in the gridview.
How can I only export the records from the search results, but also the make sure the records on the different pages export also?
View 1 Replies
Sep 14, 2010
how i check the spelling written in text box is correct or not. in c# i am using a file which contains some words. and this file is used to check the spelling written in text box.
View 3 Replies
Mar 25, 2011
I want export gridview data to existing word doc. The word doc is avaliable in my pc.
Is it possible to export data?
View 4 Replies
Jan 11, 2011
I have a word document which opens in a web browser using ASP.NET 2.0 this is the code:
[Code]....
THIS WORKS, PROMPTING THE USER WITH "OPEN" "SAVE" "CANCEL" OR SOME USERS WITH "SAVE" "CANCEL" DEPENDING ON USER INTERNET SECURITY SETTING. BUT FOR SECURITY ISSUES, MY BOSS WANT THIS WORD DOCUMENT TO BE OPENED IN WORD PROGRAM. (MICROSOFT WORD 93,97 ETC) IS THIS POSSIBLE....? OFCOURSE SAVING THE FILE IS OKAY, JUST OPENING THE DOCUMENT SHOULD BE NOT BROWSER.
View 3 Replies
Aug 26, 2010
My requirement is : I have to open a word document in Microsoft word from my web application and the word document is stored in the server location.
In javascript i wrote a code to open the word document like below.
var dsWordApp = new ActiveXObject("Word.Application");
var WordDoc = dsWordApp.Documents.Open(FileName)
Using above script i am able to open the local word doc files but i am unable to open the server side word doc file.
how to open a server side word doc fie in MSword.
View 1 Replies