<commit_before>from flask import Blueprint
from flask import json
from flask import jsonify
from pymongo import MongoClient
from lib.word.wordfrequency import frequency
from lib.algorithms import GunningFog
from lib.algorithms import sentament_analysis
client = MongoClient()
db = client.newspundb
raw_text = db.text
processed = db.processed

def analize_all_items():
  items = raw_text.find()
  for each in items:
    process(each)
def process(collection_item):
  text = collection_item['text']
  words = frequency.all_word_count(text)
  common_words = frequency.most_common(text)
  readability = GunningFog.count(text)
  setament = sentament_analysis.analyze_get_score(text,False)
<commit_msg>fixed typo<commit_after>from flask import Blueprint
from flask import json
from flask import jsonify
from pymongo import MongoClient
from lib.word.wordfrequency import frequency
from lib.algorithms import GunningFog
from lib.algorithms import sentament_analysis
client = MongoClient()
db = client.newspundb
raw_text = db.text
processed = db.processed

def analize_all_items():
  items = raw_text.find()
  for each in items:
    process(each)
def process(collection_item):
  text = collection_item['text']
  words = frequency.all_word_count(text)
  common_words = frequency.most_common(text)
  readability = GunningFog.count(text)
  sentament = sentament_analysis.analyze_get_score(text,False)
{'fraction_non_alphanumeric': 0.07354001441961067, 'fraction_numerical': 0.0, 'mean_word_length': 6.0456852791878175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5654537', 'n_tokens_mistral': 432, 'n_tokens_neox': 417, 'n_words': 115}