code: def separate(word, extract_shadda=False):
      """
      separate the letters from the vowels, in arabic word,
      if a letter hasn't a haraka, the not definited haraka is attributed.
      return ( letters, vowels)
      @param word: the input word
      @type word: unicode
      @param extract_shadda: extract shadda as seperate text
      @type extract_shadda: Boolean
      @return: ( letters, vowels)
      @rtype:couple of unicode
      """
      stack1 = stack.Stack(word)
      # the word is inversed in the stack
      stack1.items.reverse()
      letters = stack.Stack()
      marks = stack.Stack()
      vowels = HARAKAT
      last1 = stack1.pop()
      # if the last element must be a letter,
      # the arabic word can't starts with a haraka
      # in th stack the word is inversed
      while last1 in vowels:
          last1 = stack1.pop()
      while last1 != None:
          if last1 in vowels:
              # we can't have two harakats beside.
              # the shadda is considered as a letter
              marks.pop()
              marks.push(last1)
          elif last1 == SHADDA:
              # is the element is a Shadda,
              # the previous letter must have a sukun as mark,
              # and the shadda take the indefinate  mark
              marks.pop()
              marks.push(SUKUN)
              marks.push(NOT_DEF_HARAKA)
              letters.push(SHADDA)
          else:
              marks.push(NOT_DEF_HARAKA)
              letters.push(last1)
          last1 = stack1.pop()
      if extract_shadda:
          # the shadda is considered as letter
          wordletters = "".join(letters.items)
          # print wordletters.encode('utf8')
          shaddaplaces = re.sub("[^%s]" % SHADDA, TATWEEL, wordletters)
          shaddaplaces = re.sub(
              "%s%s" % (TATWEEL, SHADDA), SHADDA, shaddaplaces
          )
          # print wordletters.encode('utf8')
          wordletters = strip_shadda(wordletters)
          # print wordletters.encode('utf8')
          return (wordletters, "".join(marks.items), shaddaplaces)
      else:
          return ("".join(letters.items), "".join(marks.items))
  
imports: import re
  from cltk.phonology.arb.utils.pyarabic import stack
label_desc: Use image node_id 38 for calling a global function with example usage: separate(word, extract_shadda) and returns: wordletters,  str,  shaddaplaces, str,  str