| citeproc-hs-0.2: A Citation Style Language implementation in Haskell | Source code | Contents | Index
Text.CSL.Proc.Disamb |
Portability | unportable
Stability | unstable
Maintainer | Andrea Rossato <andrea.rossato@unitn.it>
Description
This module provides functions for processing the evaluated `Output` for citation disambiguation. Describe the disambiguation process.
Synopsis
disambCitations :: Style -> [Reference] -> [[(String, String)]] -> [CitationGroup]
disambWithNames :: Bool -> Bool -> [CiteData] -> [CiteData]
updateOutput :: [CiteData] -> Output -> Output
procGroup :: Style -> [(String, Reference)] -> CitationGroup
reEvaluate :: Style -> [CiteData] -> [(String, Reference)] -> CitationGroup -> CitationGroup
hasIfDis :: IfThen -> [Bool]
getCitDisambOptions :: Style -> [String]
getRefs :: [Reference] -> [[(String, String)]] -> [[(String, Reference)]]
getDuplCiteData :: [CitationGroup] -> [[CiteData]]
getCiteData :: Output -> [CiteData]
type NamesYear = ([Output], String)
getDuplNamesYear :: [CitationGroup] -> [NamesYear]
getNamesYear :: Output -> [(String, NamesYear)]
getYears :: Output -> [String]
disambiguate :: Eq a => [[a]] -> [[a]]
same :: Eq a => [a] -> [Bool]
hasDuplicates :: Eq a => [a] -> Bool
allTheSame :: Eq a => [a] -> Bool
Documentation
disambCitations :: Style -> [Reference] -> [[(String, String)]] -> [CitationGroup] | Source
Given the `Style`, the list of references and the citation groups, disambiguate citations according to the style options.
disambWithNames :: Bool -> Bool -> [CiteData] -> [CiteData] | Source
Disambiguate a list of `CiteData` by adding names to the list of contributors, thus overriding `et-al` options, if the first `Bool` is `True`, and/or by adding given-names if the second `Bool` is `True`.
updateOutput :: [CiteData] -> Output -> Output | Source
Given the list of `CiteData` with the disambiguated field set update the evaluated citations by setting the contributor list accordingly.
procGroup :: Style -> [(String, Reference)] -> CitationGroup | Source
Given the CSL `Style` and the list of `Reference`s coupled with their position, generate a `CitationGroup`. The citations are sorted according to the `Style`.
reEvaluate :: Style -> [CiteData] -> [(String, Reference)] -> CitationGroup -> CitationGroup | Source
Evaluate again a citation group with the `EvalState` `disamb` field set to `True` (for matching the `"disambiguate"` condition).
hasIfDis :: IfThen -> [Bool] | Source
Check if the `Style` has any conditional for disambiguation. In this case the conditional will be try after all other disambiguation strategies have failed. To be used with the generic `query` function.
getCitDisambOptions :: Style -> [String] | Source
Get the list of disambiguation options set in the `Style` for citations.
getRefs :: [Reference] -> [[(String, String)]] -> [[(String, Reference)]] | Source
Set the locator, the `citationNumber` and the position for each citation, with the list of `Reference`s and the list of citation groups (citation keys with locators).
getDuplCiteData :: [CitationGroup] -> [[CiteData]] | Source
Group citation data (with possible alternative names) of citations which have a duplicate (same `collision` and same `citYear`).
getCiteData :: Output -> [CiteData] | Source
For an evaluated citation get its `CiteData`. The disambiguated citation and the year fields are empty.
type NamesYear = ([Output], String) | Source
The contributors diambiguation data, the list of names and give-names, and the citation year (`OYear`).
getDuplNamesYear :: [CitationGroup] -> [NamesYear] | Source
Get the contributors list (`OContrib`) and the year occurring in more then one citation.
getNamesYear :: Output -> [(String, NamesYear)] | Source
Get the list of citation keys coupled with their `NamesYear` in the evaluated `Output`.
getYears :: Output -> [String] | Source
disambiguate :: Eq a => [[a]] -> [[a]] | Source
Try to disambiguate a list of lists by returning the first non colliding element, if any, of each list:
     disambiguate [[1,2],[1,3],[2]] = [[2],[3],[2]]
same :: Eq a => [a] -> [Bool] | Source
For each element a list of `Bool`: `True` if the element has a duplicate in the list:
     same [1,2,1] = [True,False,True]
hasDuplicates :: Eq a => [a] -> Bool | Source
allTheSame :: Eq a => [a] -> Bool | Source
Produced by Haddock version 2.4.2