colrev.record.record.Record
- class colrev.record.record.Record(data)[source]
Bases:
objectThe Record class provides a range of basic Function
Methods
add_field_provenanceAdd a field provenance, including source and note (based on a key)
add_field_provenance_noteAdd a field provenance note (based on a key)
add_provenance_allAdd a data provenance (source) to all fields
align_provenanceRemove unnecessary provenance information and add missing provenance information
change_entrytypeChange the ENTRYTYPE
complete_provenanceComplete provenance information for indexing
copy_prep_recCopy the record object (as a PrepRecord)
defectsGet a list of defects for a field
format_bib_styleSimple formatter for bibliography-style output
get_citation_formatGet the record as a citation
get_colrev_idReturns the colrev_id of the Record.
get_colrev_pdf_idGenerate the colrev_pdf_id
get_container_titleGet the record's container title (journal name, booktitle, etc.)
get_dataGet the record data
get_diffGet diff between record objects
get_field_provenanceGet the provenance for a selected field (key)
get_field_provenance_notesGet field provenance notes based on a key
get_field_provenance_sourceGet the provenance source for a selected field (key)
get_record_change_scoreDetermine how much records changed
get_record_similarityDetermine the similarity between two records (their masterdata)
get_tei_filenameGet the TEI filename associated with the file (PDF)
get_toc_keyGet the record's toc-key
get_valueGet a record value (based on the key parameter)
has_fatal_quality_defectsCheck whether a record has fatal quality defects
has_pdf_defectsCheck whether the PDF has quality defects
has_quality_defectsCheck whether a record (or specific field/key) has quality defects
ignore_defectIgnore a defect for a field
ignored_defectGet a list of ignored defects for a record
is_retractedCheck for potential retracts
masterdata_is_curatedCheck whether the record masterdata is curated
mergeGeneral-purpose record merging for preparation, curated/non-curated records and records with origins
prescreen_excludePrescreen-exclude a record
print_citation_formatPrint the record as a citation
remove_fieldRemove a field
remove_field_provenance_noteRemove field provenance notes based on a key (also if IGNORE:note)
rename_fieldRename a field
require_provEnsure that provenance fields are available
reset_pdf_provenance_notesReset the PDF (file) provenance notes
run_pdf_quality_modelRun the PDF quality model
run_quality_modelUpdate the masterdata provenance
set_masterdata_completeSet the masterdata to complete
set_masterdata_consistentSet the masterdata to consistent
set_masterdata_curatedSet record masterdata to curated
set_statusSet the record status
update_by_recordUpdate all data of a record object based on another record
update_fieldUpdate a record field (including provenance information)
Attributes
ppdataDictionary containing the record data
- add_field_provenance(*, key, source, note='')[source]
Add a field provenance, including source and note (based on a key)
- Return type:
None
- add_field_provenance_note(*, key, note)[source]
Add a field provenance note (based on a key)
- Return type:
None
- add_provenance_all(*, source)[source]
Add a data provenance (source) to all fields
- Return type:
None
- align_provenance()[source]
Remove unnecessary provenance information and add missing provenance information
- Return type:
None
- complete_provenance(*, source_info)[source]
Complete provenance information for indexing
- Return type:
bool
- data
Dictionary containing the record data
- get_colrev_id(*, assume_complete=False)[source]
Returns the colrev_id of the Record.
- Return type:
str
- get_container_title(*, na_string='NA')[source]
Get the record’s container title (journal name, booktitle, etc.)
- Return type:
str
- get_diff(other_record, *, identifying_fields_only=True)[source]
Get diff between record objects
- Return type:
list
- get_field_provenance(*, key, default_source='ORIGINAL')[source]
Get the provenance for a selected field (key)
- Return type:
dict
- get_field_provenance_notes(key)[source]
Get field provenance notes based on a key
- Return type:
list
- get_field_provenance_source(key)[source]
Get the provenance source for a selected field (key)
- Return type:
str
- classmethod get_record_change_score(record_a, record_b)[source]
Determine how much records changed
This method is less sensitive than get_record_similarity, especially when fields are missing. For example, if the journal field is missing in both records, get_similarity will return a value > 1.0. The get_record_changes will return 0.0 (if all other fields are equal).
- Return type:
float
- classmethod get_record_similarity(record_a, record_b)[source]
Determine the similarity between two records (their masterdata)
- Return type:
float
- get_value(key, *, default=None)[source]
Get a record value (based on the key parameter)
- Return type:
str
- has_fatal_quality_defects()[source]
Check whether a record has fatal quality defects
- Return type:
bool
- has_quality_defects(*, key='')[source]
Check whether a record (or specific field/key) has quality defects
- Return type:
bool
- ignored_defect(*, key, defect)[source]
Get a list of ignored defects for a record
- Return type:
bool
- merge(merging_record, *, default_source, preferred_masterdata_source_prefixes=None)[source]
General-purpose record merging for preparation, curated/non-curated records and records with origins
Apply heuristics to create a fusion of the best fields based on quality heuristics
- Return type:
None
- prescreen_exclude(*, reason, print_warning=False)[source]
Prescreen-exclude a record
- Return type:
None
- remove_field_provenance_note(*, key, note)[source]
Remove field provenance notes based on a key (also if IGNORE:note)
- Return type:
None
- run_pdf_quality_model(pdf_qm, *, set_prepared=False)[source]
Run the PDF quality model
- Return type:
None
- run_quality_model(quality_model, *, set_prepared=False)[source]
Update the masterdata provenance
- Return type:
None
- set_masterdata_complete(*, source, masterdata_repository, replace_source=True)[source]
Set the masterdata to complete
- Return type:
None