Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
Nlm30CitationDemultiplexerFilter Class Reference
Inheritance diagram for Nlm30CitationDemultiplexerFilter:
Filter DataObject

Public Member Functions

 _filterConfidenceScore (&$metadataDescription)
 
_guessValues (&$scoredCitations, $scoreThreshold)
 
getCitationOutputFilter ()
 
getOriginalDescription ()
 
 getOriginalRawCitation ()
 
 Nlm30CitationDemultiplexerFilter ()
 
process (&$input)
 
 setCitationOutputFilter (&$citationOutputFilter)
 
 setOriginalDescription (&$originalDescription)
 
 setOriginalRawCitation ($originalRawCitation)
 
- Public Member Functions inherited from Filter
 addError ($message)
 
 clearErrors ()
 
execute (&$input)
 
 Filter ($inputType, $outputType)
 
 getDisplayName ()
 
 getErrors ()
 
getInputType ()
 
getLastInput ()
 
getLastOutput ()
 
getOutputType ()
 
getRuntimeEnvironment ()
 
 getSeq ()
 
 hasErrors ()
 
 isCompatibleWithRuntimeEnvironment ()
 
process (&$input)
 
 setDisplayName ($displayName)
 
 setRuntimeEnvironment (&$runtimeEnvironment)
 
 setSeq ($seq)
 
 setTransformationType (&$inputType, &$outputType)
 
 supportedRuntimeEnvironmentSettings ()
 
 supports (&$input, &$output)
 
 supportsAsInput (&$input)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter (&$metadataAdapter)
 
 DataObject ($callHooks=true)
 
extractMetadata (&$metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
getLocalizedData ($key)
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
getSupportedExtractionAdapters ()
 
getSupportedInjectionAdapters ()
 
getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata (&$metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
upcastTo (&$targetObject)
 

Additional Inherited Members

- Public Attributes inherited from DataObject
 $_data = array()
 

Detailed Description

Filter that takes a list of NLM citation descriptions and joins them into a single "best" citation.

Definition at line 23 of file Nlm30CitationDemultiplexerFilter.inc.php.

Member Function Documentation

Nlm30CitationDemultiplexerFilter::_filterConfidenceScore ( $metadataDescription)

Derive a confidence score calculated as the similarity of the original raw citation and the citation text generated from the citation description.

Parameters
$metadataDescriptionMetadataDescription
Returns
integer filter confidence score

Definition at line 151 of file Nlm30CitationDemultiplexerFilter.inc.php.

References String\diff(), getCitationOutputFilter(), getOriginalRawCitation(), and String\strlen().

Referenced by process().

& Nlm30CitationDemultiplexerFilter::_guessValues ( $scoredCitations,
  $scoreThreshold 
)

Take an array of citation parse/lookup results and derive a citation with one "best" set of values.

We determine the best values within the citations that have a score above the given threshold. Citations with a score below the threshold will be ignored.

For these citations we count the frequency of values per meta-data property. The most frequent value will be chosen as "best" value.

If two values have the same frequency then decide based on the score. If this is still ambivalent then return the first of the remaining values.

Parameters
$scoredCitations
$scoreThresholdinteger a number between 0 (=no threshold) and 100
Returns
Citation one citation with the "best" values set

Definition at line 201 of file Nlm30CitationDemultiplexerFilter.inc.php.

Referenced by process().

& Nlm30CitationDemultiplexerFilter::getCitationOutputFilter ( )

Get the citation output filter

Returns
Nlm30CitationSchemaCitationOutputFormatFilter

Definition at line 93 of file Nlm30CitationDemultiplexerFilter.inc.php.

Referenced by _filterConfidenceScore().

& Nlm30CitationDemultiplexerFilter::getOriginalDescription ( )

Get the original citation description

Returns
MetadataDescription

Definition at line 77 of file Nlm30CitationDemultiplexerFilter.inc.php.

Referenced by process().

Nlm30CitationDemultiplexerFilter::getOriginalRawCitation ( )

Get the original raw citation

Returns
string

Definition at line 61 of file Nlm30CitationDemultiplexerFilter.inc.php.

Referenced by _filterConfidenceScore().

Nlm30CitationDemultiplexerFilter::Nlm30CitationDemultiplexerFilter ( )

Constructor

Definition at line 39 of file Nlm30CitationDemultiplexerFilter.inc.php.

References Filter\setDisplayName().

& Nlm30CitationDemultiplexerFilter::process ( $input)
See Also
Filter::process()
Parameters
$inputarray incoming MetadataDescriptions
Returns
Citation

Definition at line 106 of file Nlm30CitationDemultiplexerFilter.inc.php.

References _filterConfidenceScore(), _guessValues(), and getOriginalDescription().

Nlm30CitationDemultiplexerFilter::setCitationOutputFilter ( $citationOutputFilter)

Set the citation output filter

Parameters
$citationOutputFilterNlm30CitationSchemaCitationOutputFormatFilter

Definition at line 85 of file Nlm30CitationDemultiplexerFilter.inc.php.

Nlm30CitationDemultiplexerFilter::setOriginalDescription ( $originalDescription)

Set the original citation description

Parameters
$originalDescriptionMetadataDescription

Definition at line 69 of file Nlm30CitationDemultiplexerFilter.inc.php.

Nlm30CitationDemultiplexerFilter::setOriginalRawCitation (   $originalRawCitation)

Set the original raw citation

Parameters
$originalRawCitationstring

Definition at line 53 of file Nlm30CitationDemultiplexerFilter.inc.php.


The documentation for this class was generated from the following file: