Skip to content

Instantly share code, notes, and snippets.

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
@jazzlw
jazzlw / one_gram_plotter.py
Last active October 31, 2016 19:09
onegram play
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