Click here to Skip to main content
15,949,686 members
Home / Discussions / C#
   

C#

 
AnswerRe: The Server is not operational when authenticating user to active directory Pin
mav.northwind18-May-06 5:20
mav.northwind18-May-06 5:20 
QuestionRe:Palm Desktop software Pin
Smithasondur18-May-06 2:31
Smithasondur18-May-06 2:31 
Questiontrying to change screen resolution Pin
Alex Cutovoi18-May-06 2:21
Alex Cutovoi18-May-06 2:21 
QuestionRemoving stopwords Pin
Rizwan Rathore18-May-06 1:51
Rizwan Rathore18-May-06 1:51 
AnswerRe: Removing stopwords Pin
Robert Rohde18-May-06 2:36
Robert Rohde18-May-06 2:36 
GeneralRe: Removing stopwords Pin
Rizwan Rathore18-May-06 2:49
Rizwan Rathore18-May-06 2:49 
GeneralRe: Removing stopwords Pin
Robert Rohde18-May-06 3:00
Robert Rohde18-May-06 3:00 
GeneralRe: Removing stopwords Pin
Rizwan Rathore18-May-06 4:12
Rizwan Rathore18-May-06 4:12 
Thanks alot sir, its working really fine even better than my expectations i ve used the 2nd option of sorting the stopwords list and then applying binary search over it.....
Sir now i have another similar sort of problem....after removing the stopwords i hve to make an inverted index of the remaining words i.e to keep the record that how documents contain a certain word and how many times this word occurs in that particular file.......i ve done that but again the time is the major problem it takes lots of time i m wrting the code down wich i m using to do this.....

temp is to keep the record of the current document number
wIndex keeps the record of the objects of Teminology class each object of this class keeps track of all the info about a certain term.


for(int i = 0; i < wordList.Count; i++)
{
	//the control will come here when all the words of doc are compared
	if (wordList[i].ToString().Equals(EOF))
	{
		temp++;
		continue;
	}
	word[wIndex] = new Terminology();
	word[wIndex].term = wordList[i].ToString();
	termCount = 1;
	cDocNo = temp;
	jtemp = 0;
	for(int j = i+1; j < wordList.Count; j++)
	{
		//control will come here when a term is compared with all  
		//the words of a document
		if(i == j)
			continue;

		if(cDocNo >= 1 && jtemp == 0 && temp >=1 )
		{
			jtemp++;
			for(int k = 0; k< cDocNo;k++)
			{
                                //saving the term and document frequency of the word.(i.e in how many documents it occurs and how many times in each doc)

				word[wIndex].tf.Add(0);
				word[wIndex].docID.Add(k+1);
			}
		}
		
//EOF of end of file marker wich tells when the words of a certain doc have ended.

                if(wordList[j].ToString().Equals(EOF))
		{
//as a certain document has ended so incrementing in current doc number

			cDocNo++;
			word[wIndex].tf.Add(termCount);
			word[wIndex].docID.Add(cDocNo);	
		
//now incrementing the term freq if it is greater than zero

			if(termCount >= 1)
			{										//storing word frequency
				word[wIndex].df++;
				docCount++;
				termCount = 0;
			}
							
			continue; 
		}
			
		//checking the repetition of terms
		if(wordList[i].Equals(wordList[j]))
		{			
			wordList.RemoveAt(j);
			termCount++;
			j--;
		}
					
	}
	wIndex++;	
						
}




any suggestions to improve the efficiency of this code will b welcomed
looking forward for help
Regards,

-- modified at 10:34 Thursday 18th May, 2006
GeneralRe: Removing stopwords Pin
Robert Rohde18-May-06 4:21
Robert Rohde18-May-06 4:21 
GeneralRe: Removing stopwords Pin
Rizwan Rathore18-May-06 5:19
Rizwan Rathore18-May-06 5:19 
GeneralRe: Removing stopwords Pin
Robert Rohde18-May-06 5:52
Robert Rohde18-May-06 5:52 
Questionquestions for .NET compact Framework Pin
GDavy18-May-06 1:32
GDavy18-May-06 1:32 
Questionstatusstriplabels problem? :( Pin
cmpeng3418-May-06 1:17
cmpeng3418-May-06 1:17 
AnswerRe: statusstriplabels problem? :( Pin
Office Lineman18-May-06 6:33
Office Lineman18-May-06 6:33 
Questionhowto enable enter key active on a specific button ? Pin
cmpeng3418-May-06 1:11
cmpeng3418-May-06 1:11 
AnswerRe: howto enable enter key active on a specific button ? Pin
rah_sin18-May-06 1:35
professionalrah_sin18-May-06 1:35 
AnswerRe: howto enable enter key active on a specific button ? Pin
Rizwan Rathore18-May-06 1:57
Rizwan Rathore18-May-06 1:57 
QuestionThread.Abort() (Should I use try..catch?) Pin
Shy Agam18-May-06 1:02
Shy Agam18-May-06 1:02 
AnswerRe: Thread.Abort() (Should I use try..catch?) Pin
Robert Rohde18-May-06 1:34
Robert Rohde18-May-06 1:34 
AnswerRe: Thread.Abort() (Should I use try..catch?) Pin
Guffa18-May-06 1:36
Guffa18-May-06 1:36 
QuestionHelp needed in Reference Parameters Pin
Ashraj198218-May-06 0:42
Ashraj198218-May-06 0:42 
QuestionLaunch an application in Win CE Pin
taucher_7218-May-06 0:32
taucher_7218-May-06 0:32 
AnswerRe: Launch an application in Win CE Pin
rah_sin18-May-06 0:37
professionalrah_sin18-May-06 0:37 
GeneralRe: Launch an application in Win CE Pin
taucher_7218-May-06 1:10
taucher_7218-May-06 1:10 
AnswerRe: Launch an application in Win CE Pin
GDavy18-May-06 3:37
GDavy18-May-06 3:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.