This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sympy import sieve | |
def word_val(word): | |
try: | |
value = 0 | |
for letter in word.lower(): | |
value += ord(letter) - 96 | |
# print(letter, ord(letter) - 96) | |
return value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from one_gram_reader import * | |
import matplotlib.pyplot as plt | |
import numpy as np | |
# Returns total occurrences of the given word by adding up the counts for each year as given by word_data | |
def total_occurrences(word_data, word): | |
total = 0 |