Java Doc for ClarkeCormackScorer.java in  » Search-Engine » mg4j » it » unimi » dsi » mg4j » search » score » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » mg4j » it.unimi.dsi.mg4j.search.score 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


it.unimi.dsi.mg4j.search.score.AbstractScorer
   it.unimi.dsi.mg4j.search.score.AbstractIndexScorer
      it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer
         it.unimi.dsi.mg4j.search.score.ClarkeCormackScorer

ClarkeCormackScorer
public class ClarkeCormackScorer extends AbstractWeightedScorer implements DelegatingScorer(Code)
Computes the Clarke–Cormack score of all interval iterators of a document. This score function is defined in Charles L.A. Clarke and Gordon V. Cormack, “Shortest-Substring Retrieval and Ranking”, ACM Transactions on Information Systems, 18(1):44−78, 2000, at page 65.

The score for each index depends on two parameters: an integer h and a double α. The score is obtained summing up a certain score assigned to all intervals in the interval iterator under examination. The score assigned to an interval is 1 if the interval has length smaller than h; otherwise, it is obtained by dividing h by the interval length, and raising the result to the power of α.

Note that the score assigned to each interval is between 0 and 1 (highest scores corresponding to best intervals). The score assigned to an interval iterator is thus bounded from above by the number of intervals; an alternative version allows one to have normalized scores (in this case, the resulting value is an average instead of a sum). A scorer with similar relative ranks, but inherently (almost) normalised is provided by it.unimi.dsi.mg4j.search.score.VignaScorer .

Typically, one sets h=16 (or a bit larger) and α=1 (or a bit smaller), but the authors say that the method is rather stable w.r.t. changes in the values of parameters.



Field Summary
final public static  intDEFAULT_H
     The default value for h.
final public  doublealpha
     The parameter alpha.
final public  inth
     The parameter h.
final public  booleannormalize
     Whether the result should be normalized (i.e., between 0 and 1).

Constructor Summary
public  ClarkeCormackScorer(int h, double alpha, boolean normalize)
     Creates a Clarke–Cormack scorer.
public  ClarkeCormackScorer(String h, String alpha, String normalize)
     Creates a Clarke–Cormack scorer.
public  ClarkeCormackScorer()
     Default constructor, assigning the default values (h= ClarkeCormackScorer.DEFAULT_H , α=1) to the parameters; the resulting scorer is normalized.

Method Summary
public synchronized  ClarkeCormackScorercopy()
    
public  doublescore(Index index)
    
public  StringtoString()
    
public  booleanusesIntervals()
     Returns true.

Field Detail
DEFAULT_H
final public static int DEFAULT_H(Code)
The default value for h.



alpha
final public double alpha(Code)
The parameter alpha.



h
final public int h(Code)
The parameter h.



normalize
final public boolean normalize(Code)
Whether the result should be normalized (i.e., between 0 and 1).




Constructor Detail
ClarkeCormackScorer
public ClarkeCormackScorer(int h, double alpha, boolean normalize)(Code)
Creates a Clarke–Cormack scorer.
Parameters:
  h - the parameter h.
Parameters:
  alpha - the parameter α.
Parameters:
  normalize - whether the result should be normalized.



ClarkeCormackScorer
public ClarkeCormackScorer(String h, String alpha, String normalize)(Code)
Creates a Clarke–Cormack scorer.
Parameters:
  h - the parameter h.
Parameters:
  alpha - the parameter α.
Parameters:
  normalize - whether the result should be normalized.



ClarkeCormackScorer
public ClarkeCormackScorer()(Code)
Default constructor, assigning the default values (h= ClarkeCormackScorer.DEFAULT_H , α=1) to the parameters; the resulting scorer is normalized.




Method Detail
copy
public synchronized ClarkeCormackScorer copy()(Code)



score
public double score(Index index) throws IOException(Code)



toString
public String toString()(Code)



usesIntervals
public boolean usesIntervals()(Code)
Returns true. true.



Fields inherited from it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer
protected double currWeight(Code)(Java Doc)
protected Reference2DoubleOpenHashMap<Index> index2Weight(Code)(Java Doc)

Methods inherited from it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer
public double score() throws IOException(Code)(Java Doc)
public synchronized boolean setWeights(Reference2DoubleMap<Index> index2Weight)(Code)(Java Doc)
public void wrap(DocumentIterator documentIterator) throws IOException(Code)(Java Doc)

Fields inherited from it.unimi.dsi.mg4j.search.score.AbstractIndexScorer
protected Index currIndex(Code)(Java Doc)
protected int n(Code)(Java Doc)

Methods inherited from it.unimi.dsi.mg4j.search.score.AbstractIndexScorer
public void wrap(DocumentIterator documentIterator) throws IOException(Code)(Java Doc)

Fields inherited from it.unimi.dsi.mg4j.search.score.AbstractScorer
protected DocumentIterator documentIterator(Code)(Java Doc)

Methods inherited from it.unimi.dsi.mg4j.search.score.AbstractScorer
public boolean hasNext()(Code)(Java Doc)
public int nextDocument() throws IOException(Code)(Java Doc)
public int nextInt()(Code)(Java Doc)
public boolean setWeights(Reference2DoubleMap<Index> index2Weight)(Code)(Java Doc)
public int skip(int n)(Code)(Java Doc)
public void wrap(DocumentIterator documentIterator) throws IOException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.