Hi all,
I am getting below error, tried multiple ways, which are available online.
but still i am getting the error. could you please let me what is reason for error.
and how can i fix it.
Code i am running:
I am getting below error, tried multiple ways, which are available online.
but still i am getting the error. could you please let me what is reason for error.
and how can i fix it.
Code i am running:
import nltk
from nltk.stem.lancaster import LancasterStemmer
import numpy as np
import tflearn
import tensorflow as tf
import random
import json
import string
import unicodedata
import sys
# a table structure to hold the different punctuation used
tbl = dict.fromkeys(i for i in range(sys.maxunicode)
if unicodedata.category(chr(i)).startswith('P'))
# method to remove punctuations from sentences.
def remove_punctuation(text):
return text.translate(tbl)
# initialize the stemmer
stemmer = LancasterStemmer()
# variable to hold the Json data read from the file
data = None
# read the json file and load the training data
with open('D:\\News wype\\Sample_Data.json', 'r', encoding='utf8', errors='ignore') as json_data:
data = json.load(json_data)
print(data)error I am getting:Error: File "C:\ProgramData\Anaconda3\lib\json\decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
JSONDecodeError: Invalid \escape
