Threatthriver commited on
Commit
e8735f8
1 Parent(s): e939083

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -8
README.md CHANGED
@@ -41,20 +41,15 @@ You can load the JSON file using standard Python libraries such as json or use d
41
  import json
42
  with open('scraped_data.json', 'r', encoding='utf-8') as file:
43
  data = json.load(file)
44
- Data Processing
45
- Once loaded, you can process the data for your specific NLP tasks. For instance, you can concatenate all paragraphs for text generation models or tokenize the text for sentiment analysis.
46
- Example Usage
47
- Below is an example of how you can iterate through the dataset and process the paragraphs.
48
  for entry in data:
49
  url = entry['url']
50
  title = entry['title']
51
  paragraphs = entry['paragraphs']
52
- # Process the paragraphs
53
  for paragraph in paragraphs:
54
- # Your processing code here
55
- pass
56
  ```
57
-
58
  Loading the Dataset with Hugging Face
59
  You can also load this dataset directly using the Hugging Face datasets library. The dataset is available under the identifier Threatthriver/Hindi-story-news.
60
  Example Code
 
41
  import json
42
  with open('scraped_data.json', 'r', encoding='utf-8') as file:
43
  data = json.load(file)
44
+ all_paragraphs = []
 
 
 
45
  for entry in data:
46
  url = entry['url']
47
  title = entry['title']
48
  paragraphs = entry['paragraphs']
 
49
  for paragraph in paragraphs:
50
+ all_paragraphs.append(paragraph)
51
+ # Now all_paragraphs contains all the paragraphs concatenated
52
  ```
 
53
  Loading the Dataset with Hugging Face
54
  You can also load this dataset directly using the Hugging Face datasets library. The dataset is available under the identifier Threatthriver/Hindi-story-news.
55
  Example Code