N Gram Feature Extraction Python