You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q1: I need to calculate the similarity of other concepts. How do I use it? How do I generate this file(dbpedia_type_ic.txt')?
''' #%% Computing semantic similarity of DBpedia concepts. from sematch.semantic.graph import DBpediaDataTransform, Taxonomy from sematch.semantic.similarity import ConceptSimilarity concept = ConceptSimilarity(Taxonomy(DBpediaDataTransform()),'models/dbpedia_type_ic.txt') concept.name2concept('actor') print(concept.similarity('http://dbpedia.org/ontology/Actor','http://dbpedia.org/ontology/Film', 'wpath'))
Q2: Run the following code, there is this error, how to solve?
ConnectionResetError: [Errno 104] Connection reset by peer #%% Computing semantic similarity of DBpedia entities. from sematch.semantic.similarity import EntitySimilarity sim = EntitySimilarity() sim.similarity('http://dbpedia.org/resource/Madrid','http://dbpedia.org/resource/Barcelona') #0.409923677282 sim.similarity('http://dbpedia.org/resource/Apple_Inc.','http://dbpedia.org/resource/Steve_Jobs')#0.0904545454545 sim.relatedness('http://dbpedia.org/resource/Madrid','http://dbpedia.org/resource/Barcelona')#0.457984139871 sim.relatedness('http://dbpedia.org/resource/Apple_Inc.','http://dbpedia.org/resource/Steve_Jobs')#0.465991132787
The text was updated successfully, but these errors were encountered:
Q1: I need to calculate the similarity of other concepts. How do I use it? How do I generate this file(dbpedia_type_ic.txt')?
'''
#%% Computing semantic similarity of DBpedia concepts. from sematch.semantic.graph import DBpediaDataTransform, Taxonomy from sematch.semantic.similarity import ConceptSimilarity concept = ConceptSimilarity(Taxonomy(DBpediaDataTransform()),'models/dbpedia_type_ic.txt') concept.name2concept('actor') print(concept.similarity('http://dbpedia.org/ontology/Actor','http://dbpedia.org/ontology/Film', 'wpath'))
Q2: Run the following code, there is this error, how to solve?
ConnectionResetError: [Errno 104] Connection reset by peer
#%% Computing semantic similarity of DBpedia entities. from sematch.semantic.similarity import EntitySimilarity sim = EntitySimilarity() sim.similarity('http://dbpedia.org/resource/Madrid','http://dbpedia.org/resource/Barcelona') #0.409923677282 sim.similarity('http://dbpedia.org/resource/Apple_Inc.','http://dbpedia.org/resource/Steve_Jobs')#0.0904545454545 sim.relatedness('http://dbpedia.org/resource/Madrid','http://dbpedia.org/resource/Barcelona')#0.457984139871 sim.relatedness('http://dbpedia.org/resource/Apple_Inc.','http://dbpedia.org/resource/Steve_Jobs')#0.465991132787
The text was updated successfully, but these errors were encountered: