middleware.vocabulary.search_model ================================== .. py:module:: middleware.vocabulary.search_model .. autoapi-nested-parse:: Request and response models for lexical vocabulary term search. Classes ------- .. autoapisummary:: middleware.vocabulary.search_model.TermSearchRequest middleware.vocabulary.search_model.TermSearchHit middleware.vocabulary.search_model.TermSearchResponse Module Contents --------------- .. py:class:: TermSearchRequest(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Inputs for ranking vocabulary terms against a natural-language query. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: query :type: str :value: None .. py:attribute:: vocabularies :type: tuple[rdflib_reasoning.axiom.common.N3IRIRef, Ellipsis] :value: None .. py:attribute:: term_types :type: tuple[rdflib_reasoning.middleware.namespaces.common.VocabularyTermType, Ellipsis] :value: None .. py:attribute:: limit :type: int :value: None .. py:class:: TermSearchHit(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` One ranked vocabulary term match with a score and short explanations. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: uri :type: rdflib_reasoning.axiom.common.N3IRIRef .. py:attribute:: label :type: str .. py:attribute:: definition :type: str .. py:attribute:: termType :type: rdflib_reasoning.middleware.namespaces.common.VocabularyTermType .. py:attribute:: vocabulary :type: rdflib_reasoning.axiom.common.N3IRIRef .. py:attribute:: score :type: float :value: None .. py:attribute:: why_matched :type: tuple[str, Ellipsis] :value: None .. py:class:: TermSearchResponse(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Ranked search hits returned for a ``TermSearchRequest`` query. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: query :type: str .. py:attribute:: hits :type: tuple[TermSearchHit, Ellipsis]