Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » Speller routine
Re: Speller routine [message #56086 is a reply to message #56085] Fri, 22 January 2021 14:23 Go to previous message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi
I created a file pt_br.usp containing words that the file pt_br.udc did not contemplate, I put it in the root of the application and it works. So in topic (a) by the written sources it allows this functionality. In the file pt_br.usp, it makes no sense for me to write
a variation of the same word ... example:
anything
anyTHING
Anything ... etc ...
To solve this, inside the function "spellWordRaw" (Speller.cpp) every line containing "return f-> user.Find (wrd)> = 0" could be replaced by the return of a function below "return SpellWordRawMeu( f,wrd);" :

bool SpellWordRawMeu( Speller *f, const WString& wrd ){
	String t1 = ToUtf8(wrd);
	String t2 = ToUtf8(ToLower(wrd));
	
	WString w1 =t1.ToWString();
	WString w2 =t2.ToWString();
	
	boolean b1 =  f->user.Find(w1) >= 0;
	boolean b2 =  f->user.Find(w2) >= 0;
	if(b1 || b2){
		return true;
	}else{
		return false;
	}
}



in preliminary tests, it worked!
So, in order not to disturb the others written in the code that already works, externally, the user of my country could keep the file with udc extension without content, and create a partial file with usp extension, with all lowercase words (the which is not difficult to get here / I already did this to test). So a routine can easily be written into a routine for the user to update the usp file if necessary.

I searched on google about MakeSpellScd, but the only 2 references fall into the discussion where you already know.

Thanks
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Report Perform() and printing
Next Topic: search in Report
Goto Forum:
  


Current Time: Tue May 07 02:43:55 CEST 2024

Total time taken to generate the page: 0.02561 seconds