• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

kencodingprober::nsHebrewProber

kencodingprober::nsHebrewProber Class Reference

#include <nsHebrewProber.h>

Inheritance diagram for kencodingprober::nsHebrewProber:
kencodingprober::nsCharSetProber

List of all members.

Public Member Functions

virtual const char * GetCharSetName ()
virtual float GetConfidence (void)
virtual nsProbingState GetState (void)
virtual nsProbingState HandleData (const char *aBuf, unsigned int aLen)
 nsHebrewProber (void)
virtual void Reset (void)
void SetModelProbers (nsCharSetProber *logicalPrb, nsCharSetProber *visualPrb)
virtual void SetOpion ()
virtual ~nsHebrewProber (void)

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

Detailed Description

Definition at line 33 of file nsHebrewProber.h.


Constructor & Destructor Documentation

kencodingprober::nsHebrewProber::nsHebrewProber ( void   )  [inline]

Definition at line 36 of file nsHebrewProber.h.

virtual kencodingprober::nsHebrewProber::~nsHebrewProber ( void   )  [inline, virtual]

Definition at line 38 of file nsHebrewProber.h.


Member Function Documentation

const char * kencodingprober::nsHebrewProber::GetCharSetName (  )  [virtual]

Implements kencodingprober::nsCharSetProber.

Definition at line 134 of file nsHebrewProber.cpp.

virtual float kencodingprober::nsHebrewProber::GetConfidence ( void   )  [inline, virtual]

Implements kencodingprober::nsCharSetProber.

Definition at line 45 of file nsHebrewProber.h.

nsProbingState kencodingprober::nsHebrewProber::GetState ( void   )  [virtual]

Implements kencodingprober::nsCharSetProber.

Definition at line 170 of file nsHebrewProber.cpp.

nsProbingState kencodingprober::nsHebrewProber::HandleData ( const char *  aBuf,
unsigned int  aLen 
) [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.

bool kencodingprober::nsHebrewProber::isFinal ( char  c  )  [static, protected]

Definition at line 53 of file nsHebrewProber.cpp.

bool kencodingprober::nsHebrewProber::isNonFinal ( char  c  )  [static, protected]

Definition at line 58 of file nsHebrewProber.cpp.

void kencodingprober::nsHebrewProber::Reset ( void   )  [virtual]

Implements kencodingprober::nsCharSetProber.

Definition at line 159 of file nsHebrewProber.cpp.

void kencodingprober::nsHebrewProber::SetModelProbers ( nsCharSetProber *  logicalPrb,
nsCharSetProber *  visualPrb 
) [inline]

Definition at line 48 of file nsHebrewProber.h.

virtual void kencodingprober::nsHebrewProber::SetOpion (  )  [inline, virtual]

Implements kencodingprober::nsCharSetProber.

Definition at line 46 of file nsHebrewProber.h.


Member Data Documentation

char kencodingprober::nsHebrewProber::mBeforePrev [protected]

Definition at line 62 of file nsHebrewProber.h.

int kencodingprober::nsHebrewProber::mFinalCharLogicalScore [protected]

Definition at line 59 of file nsHebrewProber.h.

int kencodingprober::nsHebrewProber::mFinalCharVisualScore [protected]

Definition at line 59 of file nsHebrewProber.h.

nsCharSetProber* kencodingprober::nsHebrewProber::mLogicalProb [protected]

Definition at line 65 of file nsHebrewProber.h.

char kencodingprober::nsHebrewProber::mPrev [protected]

Definition at line 62 of file nsHebrewProber.h.

nsCharSetProber * kencodingprober::nsHebrewProber::mVisualProb [protected]

Definition at line 65 of file nsHebrewProber.h.


The documentation for this class was generated from the following files:
  • nsHebrewProber.h
  • nsHebrewProber.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal