-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme
More file actions
29 lines (23 loc) · 1.65 KB
/
readme
File metadata and controls
29 lines (23 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
The main Idea is very simple, is to create a number system out of the language alphabet
(in current code, Arabic characters has been mapped and it can be replaced with any latin characters codes).
So, it can be converted back and forth from Decimal number system (base 10) to Arabic number system (base 37)
and incase of English it will be a number system with base 27.
The benefits are:
1- Less memory foot print, where a string with 8 characters long can be stored in 2 to 4 bytes and a string with
with up to 12 characters long can be stored in 8 bytes.
2- Speed, it is faster in string processing and comparison (comparing numbers vs strings).
*************************************************************************************************
class CCharMapings:
This class is responsible for holding the mapping character arrays between the character representation and the internal representation.
It contains two data members they are:
BYTE CharMapTable[46];
BYTE NoToCharTable[37];
Its constructor is responsible for filling these 2 arrays.
*************************************************************************************************
class CUtilities:
Class's methods:
1. ui32Pow and ui64Pow which calculate the power using unsigned integer and unsigned integer 64 bit.
2. ConvertStr13ToNo, ConvertStr6ToNo which convert the string value to an equivalent number.
3. ConvertNoToStr13, ConvertNoToStr6 which convert the number to its equivalent string characters.
4. RemoveUnValidChars which removes any non arabic characters.
This class is used while translating the Arabic words in a lexicon, identifying the word, and cleaning the input word for processing.