# Path: indra/sources/eidos/client.py
# def process_text(text, webservice):
# 
# Path: indra/sources/eidos/bio_processor.py
# class EidosBioProcessor(EidosProcessor):
#     """Class to extract biology-oriented INDRA statements from Eidos output
#     in a way that agents are grounded to biomedical ontologies."""
# 
#     def __init__(self, json_dict, grounder: Optional[Grounder] = None):
#         super().__init__(json_dict)
#         if grounder:
#             self.grounder = grounder
#         else:
#             self.grounder = default_grounder_wrapper
# 
#     def get_regulate_activity(self, stmt):
#         context = stmt.evidence[0].text
#         subj = self.get_agent_bio(stmt.subj.concept, context=context)
#         obj = self.get_agent_bio(stmt.obj.concept, context=context)
#         if not subj or not obj:
#             return None
#         pol = stmt.overall_polarity()
#         stmt_type = Activation if pol == 1 or not pol else Inhibition
#         bio_stmt = stmt_type(subj, obj, evidence=stmt.evidence)
#         return bio_stmt
# 
#     def extract_statements(self):
#         self.extract_causal_relations()
#         bio_stmts = []
#         for stmt in self.statements:
#             bio_stmt = self.get_regulate_activity(stmt)
#             if bio_stmt:
#                 bio_stmts.append(bio_stmt)
#         self.statements = bio_stmts
# 
#     def get_agent_bio(self, concept, context=None):
#         return get_agent_bio(concept, context=context, grounder=self.grounder)


import json
import logging
from indra.sources.eidos import client as eidos_client
from .bio_processor import EidosBioProcessor
    from .reader import EidosReader
    from indra.sources.eidos.bio_processor import EidosBioProcessor
    from .bio_processor import get_agent_bio
__all__ = ['_run_eidos_on_text', 'process_text_bio',
           'process_json_bio', 'process_json_bio_entities',
           'process_text_bio_entities', 'eidos_reader',
           'initialize_reader']


logger = logging.getLogger(__name__)


try:
    # For text reading
    eidos_reader = EidosReader()

# Path: indra/sources/eidos/client.py
# def process_text(text, webservice):
# 
# Path: indra/sources/eidos/bio_processor.py
# class EidosBioProcessor(EidosProcessor):
#     """Class to extract biology-oriented INDRA statements from Eidos output
#     in a way that agents are grounded to biomedical ontologies."""
# 
#     def __init__(self, json_dict, grounder: Optional[Grounder] = None):
#         super().__init__(json_dict)
#         if grounder:
#             self.grounder = grounder
#         else:
#             self.grounder = default_grounder_wrapper
# 
#     def get_regulate_activity(self, stmt):
#         context = stmt.evidence[0].text
#         subj = self.get_agent_bio(stmt.subj.concept, context=context)
#         obj = self.get_agent_bio(stmt.obj.concept, context=context)
#         if not subj or not obj:
#             return None
#         pol = stmt.overall_polarity()
#         stmt_type = Activation if pol == 1 or not pol else Inhibition
#         bio_stmt = stmt_type(subj, obj, evidence=stmt.evidence)
#         return bio_stmt
# 
#     def extract_statements(self):
#         self.extract_causal_relations()
#         bio_stmts = []
#         for stmt in self.statements:
#             bio_stmt = self.get_regulate_activity(stmt)
#             if bio_stmt:
#                 bio_stmts.append(bio_stmt)
#         self.statements = bio_stmts
# 
#     def get_agent_bio(self, concept, context=None):
#         return get_agent_bio(concept, context=context, grounder=self.grounder)


# Path: indra/sources/eidos/api.py
import json
import logging
from indra.sources.eidos import client as eidos_client
from .bio_processor import EidosBioProcessor
    from .reader import EidosReader
    from indra.sources.eidos.bio_processor import EidosBioProcessor
    from .bio_processor import get_agent_bio

__all__ = ['_run_eidos_on_text', 'process_text_bio',
           'process_json_bio', 'process_json_bio_entities',
           'process_text_bio_entities', 'eidos_reader',
           'initialize_reader']


logger = logging.getLogger(__name__)


try:
    # For text reading
    eidos_reader = EidosReader()

except Exception as e: