KDECore
#include <nsHebrewProber.h>
Public Member Functions | |
nsHebrewProber (void) | |
virtual | ~nsHebrewProber (void) |
virtual const char * | GetCharSetName () |
virtual float | GetConfidence (void) |
virtual nsProbingState | GetState (void) |
virtual nsProbingState | HandleData (const char *aBuf, unsigned int aLen) |
virtual void | Reset (void) |
void | SetModelProbers (nsCharSetProber *logicalPrb, nsCharSetProber *visualPrb) |
virtual void | SetOpion () |
Public Member Functions inherited from kencodingprober::nsCharSetProber | |
virtual | ~nsCharSetProber () |
Static Protected Member Functions | |
static bool | isFinal (char c) |
static bool | isNonFinal (char c) |
Protected Attributes | |
char | mBeforePrev |
int | mFinalCharLogicalScore |
int | mFinalCharVisualScore |
nsCharSetProber * | mLogicalProb |
char | mPrev |
nsCharSetProber * | mVisualProb |
Additional Inherited Members | |
Static Public Member Functions inherited from kencodingprober::nsCharSetProber | |
static bool | FilterWithEnglishLetters (const char *aBuf, unsigned int aLen, char **newBuf, unsigned int &newLen) |
static bool | FilterWithoutEnglishLetters (const char *aBuf, unsigned int aLen, char **newBuf, unsigned int &newLen) |
Detailed Description
Definition at line 33 of file nsHebrewProber.h.
Constructor & Destructor Documentation
|
inline |
Definition at line 36 of file nsHebrewProber.h.
|
inlinevirtual |
Definition at line 38 of file nsHebrewProber.h.
Member Function Documentation
|
virtual |
Implements kencodingprober::nsCharSetProber.
Definition at line 134 of file nsHebrewProber.cpp.
|
inlinevirtual |
Implements kencodingprober::nsCharSetProber.
Definition at line 45 of file nsHebrewProber.h.
|
virtual |
Implements kencodingprober::nsCharSetProber.
Definition at line 170 of file nsHebrewProber.cpp.
|
virtual |
HandleData Final letter analysis for logical-visual decision.
Look for evidence that the received buffer is either logical Hebrew or visual Hebrew. The following cases are checked: 1) A word longer than 1 letter, ending with a final letter. This is an indication that the text is laid out "naturally" since the final letter really appears at the end. +1 for logical score. 2) A word longer than 1 letter, ending with a Non-Final letter. In normal Hebrew, words ending with Kaf, Mem, Nun, Pe or Tsadi, should not end with the Non-Final form of that letter. Exceptions to this rule are mentioned above in isNonFinal(). This is an indication that the text is laid out backwards. +1 for visual score 3) A word longer than 1 letter, starting with a final letter. Final letters should not appear at the beginning of a word. This is an indication that the text is laid out backwards. +1 for visual score.
The visual score and logical score are accumulated throughout the text and are finally checked against each other in GetCharSetName(). No checking for final letters in the middle of words is done since that case is not an indication for either Logical or Visual text.
The input buffer should not contain any white spaces that are not (' ') or any low-ascii punctuation marks.
Implements kencodingprober::nsCharSetProber.
Definition at line 98 of file nsHebrewProber.cpp.
|
staticprotected |
Definition at line 53 of file nsHebrewProber.cpp.
|
staticprotected |
Definition at line 58 of file nsHebrewProber.cpp.
|
virtual |
Implements kencodingprober::nsCharSetProber.
Definition at line 159 of file nsHebrewProber.cpp.
|
inline |
Definition at line 48 of file nsHebrewProber.h.
|
inlinevirtual |
Implements kencodingprober::nsCharSetProber.
Definition at line 46 of file nsHebrewProber.h.
Member Data Documentation
|
protected |
Definition at line 62 of file nsHebrewProber.h.
|
protected |
Definition at line 59 of file nsHebrewProber.h.
|
protected |
Definition at line 59 of file nsHebrewProber.h.
|
protected |
Definition at line 65 of file nsHebrewProber.h.
|
protected |
Definition at line 62 of file nsHebrewProber.h.
|
protected |
Definition at line 65 of file nsHebrewProber.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.