14.5.13. crate_anon.nlp_manager.cloud_run_info

crate_anon/nlp_manager/cloud_run_info.py


Copyright (C) 2015, University of Cambridge, Department of Psychiatry. Created by Rudolf Cardinal (rnc1001@cam.ac.uk).

This file is part of CRATE.

CRATE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

CRATE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CRATE. If not, see <https://www.gnu.org/licenses/>.


Information class describing an NLPRP remote server; particularly, which NLP processors it offers.

class crate_anon.nlp_manager.cloud_run_info.CloudRunInfo(nlpdef: crate_anon.nlp_manager.nlp_definition.NlpDefinition, debug_post_request: bool = False, debug_post_response: bool = False)[source]

Represents session-wide information about an NLP cloud run, including details of the server and our chosen processors and config.

__init__(nlpdef: crate_anon.nlp_manager.nlp_definition.NlpDefinition, debug_post_request: bool = False, debug_post_response: bool = False) None[source]
Parameters

nlpdef – a crate_anon.nlp_manager.nlp_definition.NlpDefinition

delete_dest_records(ifconfig: crate_anon.nlp_manager.input_field_config.InputFieldConfig, pkval: int, pkstr: Optional[str], commit: bool = True)[source]

Used for incremental updates. Deletes old destination records.

get_local_processors() List[crate_anon.nlp_manager.cloud_parser.Cloud][source]

Returns instances of local processors (which know about the local database structure, etc.).

get_remote_processors() List[crate_anon.nlp_webserver.server_processor.ServerProcessor][source]

Returns processors offered by the remote server.

get_requested_processors() List[Tuple[str, str]][source]

Returns the processors we wish the server to use.

Returns

each procname, procversion.

Return type

a list of tuples