original_docstring: 
    Description of the algorithm:
      - Consider the sentences:
        1) This computer is bad
        2) This is a bad computer
        3) This can turn a bad computer into a good one
  
      In the 1st sentence PC is specified as "nsubj" of "bad"  by the stanza algorithm where as for the 2nd and 3rd, bad/good is specified as "amod" of PC. So; we will check the case from the point of adjectives and then from the perspective of nouns; then check for 'nsubj'
  
      Adverb handling:
      ================
      - very good, so much good, so good and good will reduce to "good" only
      - not very good", "not su much good", "not so good", "not good", "not good at all" etc. will all reduce to "not good" only.
      
      - To achieve this, we will first process the dependency array while distinguishing each separate adjective even if they are the same adjectives (separation will be with the help of the ids); then each adjective will be reduced to simple form like "good" and "not good" without any adverbs etc.; then we will merge the same adjectives i.e. the lists represented by the adjectives which are reduced to "good" will be merged among themselves. The same applies for adjectives like "not good".
    
docstring: Description of the algorithm:
  Consider the sentences:
  1) This computer is bad
  2) This is a bad computer
  3) This can turn a bad computer into a good one
  
  
  
  Adverb handling.
  
  
  
  To achieve this, we will first process the dependency array while distinguishing each separate adjective even if they are the same adjectives (separation will be with the help of the ids); then each adjective will be reduced to simple form like "good" and "not good" without any adverbs etc.; then we will merge the same adjectives i.e. the lists represented by the adjectives which are reduced to "good" will be merged among themselves. The same applies for adjectives like "not good".
docstring_tokens: Description of the algorithm : Consider the sentences : 1 ) This computer is bad 2 ) This is a bad computer 3 ) This can turn a bad computer into a good one Adverb handling . To achieve this we will first process the dependency array while distinguishing each separate adjective even if they are the same adjectives ( separation will be with the help of the ids ) ; then each adjective will be reduced to simple form like " good " and " not good " without any adverbs etc . ; then we will merge the same adjectives i . e . the lists represented by the adjectives which are reduced to " good " will be merged among themselves . The same applies for adjectives like " not good " .
code: def aspectBased_sentiment_analysis(inputString):
  
    '''
    Description of the algorithm:
      - Consider the sentences:
        1) This computer is bad
        2) This is a bad computer
        3) This can turn a bad computer into a good one
  
      In the 1st sentence PC is specified as "nsubj" of "bad"  by the stanza algorithm where as for the 2nd and 3rd, bad/good is specified as "amod" of PC. So; we will check the case from the point of adjectives and then from the perspective of nouns; then check for 'nsubj'
  
      Adverb handling:
      ================
      - very good, so much good, so good and good will reduce to "good" only
      - not very good", "not su much good", "not so good", "not good", "not good at all" etc. will all reduce to "not good" only.
      
      - To achieve this, we will first process the dependency array while distinguishing each separate adjective even if they are the same adjectives (separation will be with the help of the ids); then each adjective will be reduced to simple form like "good" and "not good" without any adverbs etc.; then we will merge the same adjectives i.e. the lists represented by the adjectives which are reduced to "good" will be merged among themselves. The same applies for adjectives like "not good".
    '''
    #unicode_safe_print('###################################')
    #unicode_safe_print(inputString)
  
    doc = stanzaPipeline(inputString) # https://stanfordnlp.github.io/stanza/data_objects.html
    doc.text = doc.text.lower()
    
    resulting_noun_adjectiveList_dict = {}
    for sentence in doc.sentences:
      # unicode_safe_print('*********************')
      # unicode_safe_print(sentence.text)
      # unicode_safe_print(sentence.dependencies)
  
      dep_dict = {} # dependency dictionary
      initialize_dep_dict(dep_dict, sentence)
  
      # unicode_safe_print('initialize_dep_dict*********************')
      # unicode_safe_print(dep_dict)
      
      adjElem_nounElemList_dict = get_adjElem_nounElemList_dict(dep_dict, sentence)
  
      # unicode_safe_print('adjElem_nounElemList_dict*********************')
      # unicode_safe_print(adjElem_nounElemList_dict)
  
      for adjElem in adjElem_nounElemList_dict:
        dep_dict[adjElem]['nouns'] = list(adjElem_nounElemList_dict[adjElem])
      
      # unicode_safe_print('nounGroup assigning*********************')
      # unicode_safe_print(dep_dict)
  
      convert_each_adjElem_to_plainAdjLists(dep_dict)
  
      # unicode_safe_print('convert_each_adjElem_to_plainAdjLists*********************')
      # unicode_safe_print(dep_dict)
  
      flatten_Nouns_and_Adjectives(dep_dict)
  
      # unicode_safe_print('flatten_Nouns_and_Adjectives*********************')
      # unicode_safe_print(dep_dict)
      
      adjective_nounList_dict = get_adjective_nounList_dict(dep_dict)
      del dep_dict # it is not used anymore
  
      # unicode_safe_print('adjective_nounList_dict*********************')
      # unicode_safe_print(adjective_nounList_dict)
  
      noun_adjectiveList_dict = convert_to_nounAdjectiveList(adjective_nounList_dict)
      del adjective_nounList_dict # it is not used anymore
  
      # unicode_safe_print('noun_adjectiveList_dict*********************')
      # unicode_safe_print(noun_adjectiveList_dict)
  
      for noun, adjList in noun_adjectiveList_dict.items(): # update the retVal dictionary with the result of this sentence
        resulting_noun_adjectiveList_dict.setdefault(noun, []).extend(adjList)
    
    # unicode_safe_print('*********************')
    # unicode_safe_print(resulting_noun_adjectiveList_dict)
  
    retVal = filterOutNonSignificantAdjectives(resulting_noun_adjectiveList_dict)
    # unicode_safe_print('********************* FINAL RESULT *********************')
    # unicode_safe_print(retVal)
    return retVal
code_tokens: def aspectBased_sentiment_analysis ( inputString ) : doc = stanzaPipeline ( inputString ) doc . text = doc . text . lower ( ) resulting_noun_adjectiveList_dict = { } for sentence in doc . sentences : dep_dict = { } initialize_dep_dict ( dep_dict , sentence ) adjElem_nounElemList_dict = get_adjElem_nounElemList_dict ( dep_dict , sentence ) for adjElem in adjElem_nounElemList_dict : dep_dict [ adjElem ] [ 'nouns' ] = list ( adjElem_nounElemList_dict [ adjElem ] ) convert_each_adjElem_to_plainAdjLists ( dep_dict ) flatten_Nouns_and_Adjectives ( dep_dict ) adjective_nounList_dict = get_adjective_nounList_dict ( dep_dict ) del dep_dict noun_adjectiveList_dict = convert_to_nounAdjectiveList ( adjective_nounList_dict ) del adjective_nounList_dict for noun , adjList in noun_adjectiveList_dict . items ( ) : resulting_noun_adjectiveList_dict . setdefault ( noun , [ ] ) . extend ( adjList ) retVal = filterOutNonSignificantAdjectives ( resulting_noun_adjectiveList_dict ) return retVal
short_docstring: Description of the algorithm:
   Consider the sentences:
  1) This computer is bad
  2) This is a bad computer
  3) This can turn a bad computer into a good one
short_docstring_tokens: Description of the algorithm : Consider the sentences : 1 ) This computer is bad 2 ) This is a bad computer 3 ) This can turn a bad computer into a good one
comment: '''
    Description of the algorithm:
      - Consider the sentences:
        1) This computer is bad
        2) This is a bad computer
        3) This can turn a bad computer into a good one
  
      In the 1st sentence PC is specified as "nsubj" of "bad"  by the stanza algorithm where as for the 2nd and 3rd, bad/good is specified as "amod" of PC. So; we will check the case from the point of adjectives and then from the perspective of nouns; then check for 'nsubj'
  
      Adverb handling:
      ================
      - very good, so much good, so good and good will reduce to "good" only
      - not very good", "not su much good", "not so good", "not good", "not good at all" etc. will all reduce to "not good" only.
      
      - To achieve this, we will first process the dependency array while distinguishing each separate adjective even if they are the same adjectives (separation will be with the help of the ids); then each adjective will be reduced to simple form like "good" and "not good" without any adverbs etc.; then we will merge the same adjectives i.e. the lists represented by the adjectives which are reduced to "good" will be merged among themselves. The same applies for adjectives like "not good".
    '''$SEP$#unicode_safe_print('###################################')$SEP$#unicode_safe_print(inputString)$SEP$# https://stanfordnlp.github.io/stanza/data_objects.html$SEP$# unicode_safe_print('*********************')$SEP$# unicode_safe_print(sentence.text)$SEP$# unicode_safe_print(sentence.dependencies)$SEP$# dependency dictionary$SEP$# unicode_safe_print('initialize_dep_dict*********************')$SEP$# unicode_safe_print(dep_dict)$SEP$# unicode_safe_print('adjElem_nounElemList_dict*********************')$SEP$# unicode_safe_print(adjElem_nounElemList_dict)$SEP$# unicode_safe_print('nounGroup assigning*********************')$SEP$# unicode_safe_print(dep_dict)$SEP$# unicode_safe_print('convert_each_adjElem_to_plainAdjLists*********************')$SEP$# unicode_safe_print(dep_dict)$SEP$# unicode_safe_print('flatten_Nouns_and_Adjectives*********************')$SEP$# unicode_safe_print(dep_dict)$SEP$# it is not used anymore$SEP$# unicode_safe_print('adjective_nounList_dict*********************')$SEP$# unicode_safe_print(adjective_nounList_dict)$SEP$# it is not used anymore$SEP$# unicode_safe_print('noun_adjectiveList_dict*********************')$SEP$# unicode_safe_print(noun_adjectiveList_dict)$SEP$# update the retVal dictionary with the result of this sentence$SEP$# unicode_safe_print('*********************')$SEP$# unicode_safe_print(resulting_noun_adjectiveList_dict)$SEP$# unicode_safe_print('********************* FINAL RESULT *********************')$SEP$# unicode_safe_print(retVal)