# Results seemed weird so not included...

import itertools

prior_human, prior_llm = priors[m]
likelihood = submitted.laplace_smoothing(nonstop, smoothnesses[n])
diffs = []
for k in set(itertools.chain(likelihood['human'].keys(), likelihood['llm'].keys())):
    lk_human = likelihood['human'][k] if k in likelihood['human'].keys() else likelihood['human']['OOV']
    lk_llm   = likelihood['llm'][k] if k in likelihood['llm'].keys() else likelihood['llm']['OOV']
    diffs.append((k, np.log(lk_human) - np.log(lk_llm)))
diffs = sorted(diffs, key=lambda x:x[1])

print("10 most human-like bigrams")
for i in range(10):
    print(diffs[i])
print()
print("10 most llm-like bigrams")
for i in range(10):
    print(diffs[-i-1])
print()
