#!/usr/bin/env python # -*- coding:utf-8 -*- """ feature_vector.py % python feature_vector.py file import feature_vector result = feature_vector.analyse(text) """ import MeCab def analyse(text): while node: surface = node.surface.decode('utf-8') node = node.next return feature_vector if __name__ == '__main__': import sys filename = sys.argv[1] file = open(filename).read() feature_vector = analyse(
{{#tags}}- {{label}}
{{/tags}}