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

All known Subclasses:   it.unimi.dsi.mg4j.search.score.AbstractScorer,  it.unimi.dsi.mg4j.search.score.AbstractAggregator,
Scorer
public interface Scorer extends IntIterator,FlyweightPrototype<Scorer>(Code)
A wrapper for a DocumentIterator returning scored document pointers.

Typically, a scorer may have one or more constructors, but all scorers should provide a constructor that takes only strings as arguments to make the instantiation from command-line or similar interfaces easier.

To be (re)used, a scorer must first an underlying it.unimi.dsi.mg4j.search.DocumentIterator . This phase usually involves some preprocessing around properties of the document iterator to be scored. After wrapping, calls to Scorer.nextDocument() and Scorer.score() (or possibly Scorer.score(Index) ) will return the next document pointer and its score. Note that these methods are not usually idempotent, as they modify the state of the underlying iterator (e.g., they consume intervals).

Scores returned by a scorer might depend on some associated to each index.

Optionally, a scorer might be a it.unimi.dsi.mg4j.search.score.DelegatingScorer .

Warning: implementations of this interface are not required to be thread-safe, but they provide . The Scorer.copy() method is strengthened so to return an object implementing this interface.





Method Summary
public  Scorercopy()
    
public  intnextDocument()
     Returns the next document provided by this scorer, or -1 if no more documents are available.
public  intnextInt()
     Returns the next document.
public  doublescore()
     Returns a score for the current document of the last document iterator given to Scorer.wrap(DocumentIterator) .
public  doublescore(Index index)
     Returns a score for the current document of the last document iterator given to Scorer.wrap(DocumentIterator) , but considering only a given index (optional operation).
Parameters:
  index - the only index to be considered.
public  booleansetWeights(Reference2DoubleMap<Index> index2Weight)
     Sets the weight map for this scorer (if applicable).
public  booleanusesIntervals()
     Whether this scorer uses intervals.
public  voidwrap(DocumentIterator documentIterator)
     Wraps a document iterator and prepares the internal state of this scorer to work with it.



Method Detail
copy
public Scorer copy()(Code)



nextDocument
public int nextDocument() throws IOException(Code)
Returns the next document provided by this scorer, or -1 if no more documents are available. the next document, or -1 if no more documents are available.



nextInt
public int nextInt()(Code)
Returns the next document. Scorer.nextDocument()IntIteratorScorer.nextDocument()DocumentIterator.nextDocument
See Also:   Scorer.nextDocument()



score
public double score() throws IOException(Code)
Returns a score for the current document of the last document iterator given to Scorer.wrap(DocumentIterator) . the score.



score
public double score(Index index) throws IOException(Code)
Returns a score for the current document of the last document iterator given to Scorer.wrap(DocumentIterator) , but considering only a given index (optional operation).
Parameters:
  index - the only index to be considered. the score.



setWeights
public boolean setWeights(Reference2DoubleMap<Index> index2Weight)(Code)
Sets the weight map for this scorer (if applicable).

The given map will be copied internally and can be used by the caller without affecting the scorer behaviour. Implementing classes should rescale the weights so that they have sum equal to one.

Indices not appearing in the map will have weight equal to 0.
Parameters:
  index2Weight - a map from indices to weights. true if this scorer supports weights.




usesIntervals
public boolean usesIntervals()(Code)
Whether this scorer uses intervals.

This method is essential when , because if several scores need intervals, a it.unimi.dsi.mg4j.search.CachingDocumentIterator will be necessary. true if this scorer uses intervals.




wrap
public void wrap(DocumentIterator documentIterator) throws IOException(Code)
Wraps a document iterator and prepares the internal state of this scorer to work with it.

Subsequent calls to Scorer.score() and Scorer.score(Index) will use d to compute the score.
Parameters:
  documentIterator - the document iterator that will be used in subsequent calls toScorer.score() and Scorer.score(Index).




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