pt.tumba.links
Class Amsler

java.lang.Object
  extended by pt.tumba.links.Amsler

public class Amsler
extends java.lang.Object

Amsler is a similarity measure used to establish a subject similarity between two items fusing both Bibliographic Coupling and Co-Citation. Two items A and B are related if A and B are references by many same items, if A and B both reference many same items, or A references a third item C that references B. The measure was proposed by Robert Amsler in "Applications of citation-based automatic classification", Linguistics Research Center, Univ. Texas at Austin, Technical Report 72-14, Dec. 1972.

Author:
Bruno Martins
See Also:
CoCitation, Coupling

Field Summary
private  WebGraph graph
          The data structure containing the Web linkage graph
private  java.util.Map scores
          A Map containing the Amsler values for each page
 
Constructor Summary
Amsler(WebGraph graph)
          Constructor for Amsler
 
Method Summary
private  java.util.Map amsler(java.lang.Integer id)
          Returns the Amsler score between a given link identifyer and all other links in the Web graph Identifyers are Integer numberes, used in WebGraph to represent the Web graph for efficiency reasons.
private  java.lang.Double amsler(java.lang.Integer id1, java.lang.Integer id2)
          Returns the Amsler score between two given link identifyers Identifyers are Integer numberes, used in WebGraph to represent the Web graph for efficiency reasons.
 java.util.Map amsler(java.lang.String link)
          Returns the Amsler score between a given link and all other links in the Web graph
 java.lang.Double amsler(java.lang.String link1, java.lang.String link2)
          Returns the Amsler score between two given links
 void computeAmsler()
          Computes the Amsler score for all the nodes with all the other in the Web graph.
private  void computeAmsler(java.lang.Integer id)
          Computes the Amsler score for a given link identifyer with all the other links in the Web graph.
private  java.lang.Double computeAmsler(java.lang.Integer id1, java.lang.Integer id2)
          Computes the Amsler score between two given link identifyers.
 void computeAmsler(java.lang.String link)
          Computes the Amsler score for a given link.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graph

private WebGraph graph
The data structure containing the Web linkage graph


scores

private java.util.Map scores
A Map containing the Amsler values for each page

Constructor Detail

Amsler

public Amsler(WebGraph graph)
Constructor for Amsler

Parameters:
graph - The data structure containing the Web linkage graph
Method Detail

computeAmsler

public void computeAmsler()
Computes the Amsler score for all the nodes with all the other in the Web graph.


computeAmsler

public void computeAmsler(java.lang.String link)
Computes the Amsler score for a given link.

Parameters:
link - The url for the link

amsler

public java.util.Map amsler(java.lang.String link)
Returns the Amsler score between a given link and all other links in the Web graph

Parameters:
link - The url for the link
Returns:
A Map with the Amsler score between the given link and all other links in the Web graph. Keys in the Map are link identifyers for all the other links, and values correspond to the Amsler score

amsler

public java.lang.Double amsler(java.lang.String link1,
                               java.lang.String link2)
Returns the Amsler score between two given links

Parameters:
link1 - The url for one of the links
link2 - The url for the other link
Returns:
The Amsler score between the two given links

amsler

private java.util.Map amsler(java.lang.Integer id)
Returns the Amsler score between a given link identifyer and all other links in the Web graph Identifyers are Integer numberes, used in WebGraph to represent the Web graph for efficiency reasons.

Parameters:
link - The identifyer for the link
Returns:
A Map with the Amsler score between the given link and all other links in the Web graph. Keys in the Map are link identifyers for all the other links, and values correspond to the Amsler score

amsler

private java.lang.Double amsler(java.lang.Integer id1,
                                java.lang.Integer id2)
Returns the Amsler score between two given link identifyers Identifyers are Integer numberes, used in WebGraph to represent the Web graph for efficiency reasons.

Parameters:
link1 - The identifyer for one of the links
link2 - The identifyer for the other link
Returns:
The Amsler score between the two given link identifyers
See Also:
WebGraph.IdentifyerToURL()

computeAmsler

private void computeAmsler(java.lang.Integer id)
Computes the Amsler score for a given link identifyer with all the other links in the Web graph. Identifyers are Integer numberes, used in WebGraph to represent the Web graph for efficiency reasons.

Parameters:
link1 - The identifyer for the link
See Also:
WebGraph.IdentifyerToURL()

computeAmsler

private java.lang.Double computeAmsler(java.lang.Integer id1,
                                       java.lang.Integer id2)
Computes the Amsler score between two given link identifyers. Identifyers are Integer numberes, used in WebGraph to represent the Web graph for efficiency reasons.

Parameters:
link1 - The identifyer for one of the links
link2 - The identifyer for the other link
See Also:
WebGraph.IdentifyerToURL()