it.unimi.dsi.mg4j.search.score

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 
it.unimi.dsi.mg4j.search.score
MG4J: Managing Gigabytes for Java

Classes for assigning scores to documents.

The content of this package has changed significantly in MG4J 1.1 (hopefully for the better). A {@link it.unimi.dsi.mg4j.search.score.Scorer} is an object that wraps an underlying {@link it.unimi.dsi.mg4j.search.DocumentIterator} and assigns scores to the documents returned by the underlying iterator. In general, once a scorer has {@linkplain it.unimi.dsi.mg4j.search.score.Scorer#wrap(it.unimi.dsi.mg4j.search.DocumentIterator) wrapped a document iterator} one just calls {@link it.unimi.dsi.fastutil.ints.IntIterator#nextInt() nextInt()} and {@link it.unimi.dsi.mg4j.search.score.Scorer#score()} to get scored documents (some iterators might support {@linkplain it.unimi.dsi.mg4j.search.score.Scorer#score(it.unimi.dsi.mg4j.index.Index) index-restricted scoring}, but this is optional).

If the scorer is a {@link it.unimi.dsi.mg4j.search.score.DelegatingScorer}, then by contract it just delegates all {@link it.unimi.dsi.fastutil.ints.IntIterator}'s methods to the underlying iterator. In this case, it is possible to advance manually the underlying iterator and call {@link it.unimi.dsi.mg4j.search.score.Scorer#score()}. While this behaviour is useless for general users, it is essential for {@linkplain it.unimi.dsi.mg4j.search.score.AbstractAggregator aggregated scorers}, which combine several delegating scorers and provide services such as equalisation and interval caching (in case more than one component scorer uses intervals). See, for instance, {@link it.unimi.dsi.mg4j.search.score.LinearAggregator}.

Java Source File NameTypeComment
AbstractAggregator.javaClass A Scorer that aggregates a number of underlying it.unimi.dsi.mg4j.search.score.DelegatingScorer delegating scorers , providing equalisation if required.

An aggregator combines the results of several scorers following some policy (see, e.g., it.unimi.dsi.mg4j.search.score.LinearAggregator ).

AbstractIndexScorer.javaClass An abstract subclass of it.unimi.dsi.mg4j.search.score.AbstractScorer .
AbstractScorer.javaClass An abstract implementation of it.unimi.dsi.mg4j.search.score.Scorer . It provides internal caching of the underlying document iterator during , and a complete implementation of the it.unimi.dsi.fastutil.ints.IntIterator methods by delegation to the underlying document iterator (implementing subclasses that do not alter this behaviour should implement it.unimi.dsi.mg4j.search.score.DelegatingScorer ).
AbstractWeightedScorer.javaClass An abstract subsclass of it.unimi.dsi.mg4j.search.score.AbstractIndexScorer providing internal storage and copy of the weight map, faster array-based access to the latter, and a default implementation of AbstractWeightedScorer.score() .
BM25Scorer.javaClass 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.

ClarkeCormackScorer.javaClass Computes the Clarke–Cormack score of all interval iterators of a document. This score function is defined in Charles L.A.
ConstantScorer.javaClass A scorer assigning a constant score (0 by default) to all documents.
CountScorer.javaClass A trivial scorer that computes the score by adding the counts (the number of occurrences within the current document) of each term multiplied by the weight of the relative index.
DecreasingDocumentRankScorer.javaClass Compute scores that do not depend on intervals, but that just assign a fixed score to each document starting from 1; scores are read from a file whose name is passed to the constructor.

This scorer assumes that scores are nonnegative and that documents are ordered in decreasing score order: that is, that if i < j then the score of i is greater than or equal to the score of j. This allows to normalise the score (the document with the highest score has exactly score 1) without additional costs.

DelegatingScorer.javaInterface A marker interface for those scorers that delegate all it.unimi.dsi.fastutil.ints.IntIterator 's method to the underlying it.unimi.dsi.mg4j.search.DocumentIterator DocumentIterator .

An can only aggregate scorers of this kind.

DocumentRankScorer.javaClass Compute scores that do not depend on intervals, but that just assign a fixed score to each document; scores are read from a file whose name is passed to the constructor.
DocumentScoreInfo.javaClass A container used to return scored results with additional information.
LinearAggregator.javaClass An aggregator that computes a linear combination of the component scorers.

This class requires, beside the usually array of scorers, a parallel array of weights (not to be confused with it.unimi.dsi.mg4j.search.score.Scorer.setWeights(Reference2DoubleMap) index weights ). The score from each scorer will be multiplied by the respective weight, and the overal score will be the sum of these values.

ScoredDocumentBoundedSizeQueue.javaClass A queue of scored documents with fixed maximum capacity.

Instances of this class contain a queue in which it possible to . The capacity of the queue is fixed at creation time: once the queue is filled, new elements are enqueued by dequeueing those in the queue or discarded, depending on their score; the return value of ScoredDocumentBoundedSizeQueue.enqueue(int,double,Object) can be used to check whether the argument has been actually enqueued or not.

Scorer.javaInterface A wrapper for a DocumentIterator returning scored document pointers.
TfIdfScorer.javaClass A scorer that implements the TF/IDF ranking formula.

There are a number of incarnations with small variations of the formula itself.

VignaScorer.javaClass Computes the Vigna score of all interval iterators of a document.

This scorer progressively moves score from a residual (initialised to 1) to the current score (initialised to 0).

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