Improve encode labels (#37)

diff --git a/tf-ner-poc/src/main/python/namefinder/namefinder.py b/tf-ner-poc/src/main/python/namefinder/namefinder.py
index 8cd1503..f180f2b 100644
--- a/tf-ner-poc/src/main/python/namefinder/namefinder.py
+++ b/tf-ner-poc/src/main/python/namefinder/namefinder.py
@@ -121,11 +121,7 @@
         return sentences, labels, chars_set
 
     def encode_labels(self, labels):
-        label_ids = []
-        for label in labels:
-            label_ids.append(self.label_dict[label])
-
-        return label_ids
+        return list(map(lambda l: self.label_dict[l], labels))
 
     def mini_batch(self, char_dict, sentences, labels, batch_size, batch_index):
         begin = batch_size * batch_index