avoid modifying dictionary during iteration over dictionary
converted relative imports into absolute imports, cf https://github.com/nltk/nltk/issues/510