Package pyarabic :: Module named
[hide private]
[frames] | no frames]

Module named

source code

Arabic Named enteties recognation pyarabic.named

Functions [hide private]
Boolean
is_proper_noun(word)
Test if the word is a proper noun
source code
list of tuple
detect_named_position(wordlist)
Detect named enteties words in a text and return positions of each phrase.
source code
integer
extract_named(text)
Extract named enteties words in a text.
source code
integer
extract_named_within_context(text)
Extract number words in a text.
source code
integer
detect_named(text)
Detect named enteties in a text
source code
unicode
get_previous_tag(word)
Get the word tags
source code
unicode
vocalize_named(wordlist, syn_tags='')
Vocalize a number words
source code
list
pretashkeel_named(wordlist)
Detect named words in a text.
source code
Variables [hide private]
  DINENAMED = (u'شمس', u'تقي', u'علاء', u'نجم', u'نور', u'سيف')
  __package__ = 'pyarabic'
Function Details [hide private]

is_proper_noun(word)

source code 

Test if the word is a proper noun

Parameters:
  • word (unicode) - given word
Returns: Boolean
True if is properword

detect_named_position(wordlist)

source code 

Detect named enteties words in a text and return positions of each phrase.

Example: >>> detect_named_position(u"قال خالد بن رافع حدثني أحمد بن عنبر عن خاله") ((1,3), (6,8))

Parameters:
  • wordlist (unicode list @return : list of numbers clause positions [(start,end),(start2,end2),]) - wordlist
Returns: list of tuple

extract_named(text)

source code 

Extract named enteties words in a text.

Example: >>> extract_named(u"قال خالد بن رافع حدثني أحمد بن عنبر عن خاله") ("خالد بن رافع"، "أحمد بن عنبر ")

Parameters:
  • text (unicode @return : named enteties words extracted from text) - input text
Returns: integer

extract_named_within_context(text)

source code 

Extract number words in a text.

Example: >>> extractNumberPhrasesWithinContext(u"تصدق عبد الله بن عمر بدينار") ("تصدق"، "عبد الله بن عمر"، "بدينار")

Parameters:
  • text (unicode @return : number words extracted from text) - input text
Returns: integer

detect_named(text)

source code 

Detect named enteties in a text

Example: >>> text2number(u"وجد عبد الله بن عمر دينارا") عبد الله بن عمر

Parameters:
  • text (unicode @return : extract named enteties) - input text
Returns: integer

get_previous_tag(word)

source code 

Get the word tags

Parameters:
  • word (unicode @return :word tag) - given word
Returns: unicode

vocalize_named(wordlist, syn_tags='')

source code 

Vocalize a number words

Parameters:
  • wordlist (unicode list) - words to vocalize
  • syn_tags (unicode) - tags about the clause
Returns: unicode
the vocalized wordlist.

pretashkeel_named(wordlist)

source code 

Detect named words in a text. Example: >>> preTashkeelNumber(u"وجدت خمسمئة وثلاثة وعشرين دينارا") وجدت خمسمئة وثلاثة وعشرين دينارا

Parameters:
  • wordlist (unicode @return : wordlist with vocalized named clause) - input text
Returns: list