Java Doc for BM25Scorer.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.BM25Scorer

BM25Scorer
public class BM25Scorer extends AbstractWeightedScorer implements DelegatingScorer(Code)
A scorer that implements the BM25 ranking formula.

Warning: the default values BM25Scorer.DEFAULT_K1 and BM25Scorer.DEFAULT_B have changed in MG4J 1.1.2 (see below).

BM25 is the name of a formula derived from the probabilistic model. The essential feature of the formula is that of assigning to each term appearing in a given document a weight depending both on the count (the number of occurrences of the term in the document), on the frequency (the number of the documents in which the term appears) and on the document length (in words).

There are a number of incarnations with small variations of the formula itself. Here, the weight assigned to a term which appears in f documents out of a collection of N documents w.r.t. to a document of length l in which the term appears c times is

log( (Nf + 1/2) / (f + 1/2) ) ( k1 + 1 ) c    ( c + k1 ((1 − b) + bl / L) ),
where L is the average document length, and k1 and b are parameters that default to BM25Scorer.DEFAULT_K1 and BM25Scorer.DEFAULT_B : these values were chosen following the suggestions given in “Efficiency vs. effectiveness in Terabyte-scale information retrieval”, by Stefan Büttcher and Charles L. A. Clarke, in Proceedings of the 14th Text REtrieval Conference (TREC 2005). Gaithersburg, USA, November 2005. The logarithmic part (a.k.a. idf (inverse document-frequency) part) is actually maximised with BM25Scorer.EPSILON_SCORE , so it is never negative (the net effect being that terms appearing in more than half of the documents have almost no weight).

This class uses a it.unimi.dsi.mg4j.search.visitor.CounterCollectionVisitor and related classes to take into consideration only terms that are actually involved in the current document.
author:
   Mauro Mereu
author:
   Sebastiano Vigna



Field Summary
final public static  doubleDEFAULT_B
     The default value used for the parameter b.
final public static  doubleDEFAULT_K1
     The default value used for the parameter k1.
final public static  doubleEPSILON_SCORE
     The value of the document-frequency part for terms appearing in more than half of the documents.
final public  doubleb
     The parameter b.
final public  doublek1
     The parameter k1.

Constructor Summary
public  BM25Scorer()
    
public  BM25Scorer(double k1, double b)
    
public  BM25Scorer(String k1, String b)
    

Method Summary
public synchronized  BM25Scorercopy()
    
public  doublescore()
    
public  doublescore(Index index)
    
public  booleanusesIntervals()
    
public  voidwrap(DocumentIterator d)
    

Field Detail
DEFAULT_B
final public static double DEFAULT_B(Code)
The default value used for the parameter b.



DEFAULT_K1
final public static double DEFAULT_K1(Code)
The default value used for the parameter k1.



EPSILON_SCORE
final public static double EPSILON_SCORE(Code)
The value of the document-frequency part for terms appearing in more than half of the documents.



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



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




Constructor Detail
BM25Scorer
public BM25Scorer()(Code)



BM25Scorer
public BM25Scorer(double k1, double b)(Code)



BM25Scorer
public BM25Scorer(String k1, String b)(Code)




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



score
public double score() throws IOException(Code)



score
public double score(Index index)(Code)



usesIntervals
public boolean usesIntervals()(Code)



wrap
public void wrap(DocumentIterator d) throws IOException(Code)



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.