colrev.ops.search.Search¶
- class Search(*, review_manager, notify_state_transition_operation=True)[source]¶
Bases:
Operation
Search for new records
Methods
Get the most likely SearchSources
Add a SearchSource and run the search
Check the operation precondition
Conclude the operation (stop Docker containers)
Interactively add an API SearchSource
Interactively add a DB SearchSource
Decorator for operations
Retrieve new search files (not yet registered in settings)
Get the heuristic result list of SearchSources candidates
Get the corresponding filename for the search query
Get a unique filename for a (new) SearchSource
main
- rtype:
Callable
Notify the review_manager about the next operation
Interactively run a DB search
Select the SearchType (interactively if neccessary)
Attributes
type
- add_most_likely_sources(*, create_query_files=True)[source]¶
Get the most likely SearchSources
returns a dictionary: {“filepath”: [SearchSource1,..]}
- Return type:
None
- add_source_and_search(search_source)[source]¶
Add a SearchSource and run the search
- Return type:
None
- check_precondition()¶
Check the operation precondition
- Return type:
None
- conclude()¶
Conclude the operation (stop Docker containers)
- Return type:
None
- create_db_source(*, search_source_cls, params)[source]¶
Interactively add a DB SearchSource
- Return type:
- classmethod decorate()¶
Decorator for operations
- Return type:
Callable
- get_new_search_files()[source]¶
Retrieve new search files (not yet registered in settings)
- Return type:
list
[Path
]
- get_new_source_heuristic(filename)[source]¶
Get the heuristic result list of SearchSources candidates
returns a dictionary: {“filepath”: ({“search_source”: SourceCandidate1”, “confidence”: 0.98},..]}
- Return type:
list
- get_query_filename(*, filename, instantiate=False, interactive=False)[source]¶
Get the corresponding filename for the search query
- Return type:
Path
- get_unique_filename(file_path_string, suffix='.bib')[source]¶
Get a unique filename for a (new) SearchSource
- Return type:
Path
- notify(*, state_transition=True)¶
Notify the review_manager about the next operation
- Return type:
None
- run_db_search(*, search_source_cls, source)[source]¶
Interactively run a DB search
- Return type:
None