Esempio n. 1
0
def analyse_textprocessing(text):
  if not text:
    return None
    
  obj = TextProcessing("PUBqD=D4=4KKr4WvOfxh#VMkayw$W-iO", "PRI-@KOUBovv#gV-cPGC3wd$%P2fYU3k")
  try:
    return obj.sentiment(text)
  except Exception:
    return {'label' : 'error'}
Esempio n. 2
0
def query(text):
    if not text:
        return None
    
    obj = TextProcessing("PUBqD=D4=4KKr4WvOfxh#VMkayw$W-iO", "PRI-@KOUBovv#gV-cPGC3wd$%P2fYU3k")
    
    try:
        return obj.sentiment(util.remover_acentos(text))
    except Exception:
        return {'label' : 'erro'}