Click here to Skip to main content
15,920,633 members
Home / Discussions / C#
   

C#

 
GeneralRe: GetObject Pin
samoilb18-May-06 5:52
samoilb18-May-06 5:52 
AnswerRe: GetObject Pin
mav.northwind19-May-06 5:37
mav.northwind19-May-06 5:37 
QuestionHow to Register Windows Service usijng Registry Editor Pin
VenkataRamana.Gali18-May-06 4:21
VenkataRamana.Gali18-May-06 4:21 
AnswerRe: How to Register Windows Service usijng Registry Editor Pin
Ravi Bhavnani18-May-06 4:39
professionalRavi Bhavnani18-May-06 4:39 
QuestionHandwriting program help? Pin
eric_tran18-May-06 3:39
eric_tran18-May-06 3:39 
GeneralRe: Handwriting program help? Pin
Guffa18-May-06 4:05
Guffa18-May-06 4:05 
GeneralRe: Handwriting program help? Pin
eric_tran18-May-06 4:09
eric_tran18-May-06 4:09 
GeneralRe: Handwriting program help? Pin
mav.northwind18-May-06 5:22
mav.northwind18-May-06 5:22 
QuestionVery Important : How to Get Value of DatagridBoolColumn in Datagrid ? Pin
hdv21218-May-06 3:29
hdv21218-May-06 3:29 
AnswerRe: Very Important : How to Get Value of DatagridBoolColumn in Datagrid ? Pin
Naveed Kamboh18-May-06 5:01
Naveed Kamboh18-May-06 5:01 
Questionsynchronise folder structures Pin
V.V.Thakur18-May-06 3:21
V.V.Thakur18-May-06 3:21 
Questiona few important questions about forms ? Pin
cmpeng3418-May-06 2:59
cmpeng3418-May-06 2:59 
AnswerRe: a few important questions about forms ? Pin
stancrm18-May-06 3:13
stancrm18-May-06 3:13 
AnswerRe: a few important questions about forms ? Pin
Leyu18-May-06 8:13
Leyu18-May-06 8:13 
QuestionThe Server is not operational when authenticating user to active directory Pin
krishna nimmalapudi18-May-06 2:46
krishna nimmalapudi18-May-06 2:46 
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 

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.