The AFINN 165 dataset available as an Elm Dict
.
It's probably not a good idea to use this package; this module alone generates ~1.1 MB of JavaScript due to the way the Dict is compiled. You are almost certainly better off using a remote API instead.
But if you really want to use Elm for this, here you go.