Skip to content

Commit

Permalink
Minor fixes to whitespace and grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Feb 22, 2024
1 parent c490f66 commit 04e478f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/scribe_data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Utility functions for data extraction, formatting and loading.
Contents:
_load_json,
_find,
get_scribe_languages,
get_language_qid,
get_language_iso,
Expand Down Expand Up @@ -76,7 +78,7 @@ def _load_json(package_path: str, file_name: str, root: str):


def _find(source_key: str, source_value: str, target_key: str, error_msg: str):
"""
"""
Each 'language', (english, german,..., etc) is a dictionary of key/value pairs:
entry = {
Expand All @@ -87,16 +89,19 @@ def _find(source_key: str, source_value: str, target_key: str, error_msg: str):
"ignore-words": [...]
}
Given a key/value pair, the 'source', and the 'target' key, get the 'target' value.
Given a key/value pair, the 'source' and the 'target' key get the 'target' value.
Parameters
----------
source_value : str
The source value to find equivalents for (e.g. 'english').
source_key : str
The source key to reference (e.g. 'language').
target_key : str
The key to target (e.g. 'iso').
error_msg : str
The message displayed when a value cannot be found.
Expand Down

0 comments on commit 04e478f

Please sign in to comment.