Skip to content

Commit

Permalink
Removing newlines (\n) from the original text
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicosolazzo committed May 6, 2016
1 parent 24eaa10 commit 3d47b5f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions api/tagger/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ def taggerMain():
def taggerTags():
requestStopwords = True if request.args.get('stopwords') == 'true' else False
tags = {}

json_result = json.loads(request.data)
data = request.data
data = data.replace("'","\"").replace("\n", "")
json_result = json.loads(data)
obtManager = OBTManager(json_result)
stopwordManager = StopwordManager()

Expand All @@ -39,7 +40,7 @@ def taggerEntities():
requestStopwords = True if request.args.get('stopwords') == 'true' else False

data = request.data
data = data.replace("'","\"")
data = data.replace("'","\"").replace("\n", "")
json_result = json.loads(data)
obtManager = OBTManager(json_result)
stopwordManager = StopwordManager()
Expand Down Expand Up @@ -70,7 +71,9 @@ def taggerAnalyze():
requestEntities = True if request.args.get('entities') == 'true' else False
requestTags = True if request.args.get('tags') == 'true' else False

json_result = json.loads(request.data)
data = request.data
data = data.replace("'","\"").replace("\n", "")
json_result = json.loads(data)
obtManager = OBTManager(json_result)

result = {}
Expand Down

0 comments on commit 3d47b5f

Please sign in to comment.