python:实现计算相似度算法
from __future__ import division
import re
from math import sqrt
class Similarity(object):
def __init__(self, target1, target2):
self.target1 = target1
self.target2 = target2
def vector(self):
self.vdict1 = {