spotterbase.plugins.model_extra package

Submodules

spotterbase.plugins.model_extra.context module

spotterbase.plugins.model_extra.corpus_frac module

Model for annotating “fractional corpora”, i.e. corpora that are a subset of a larger corpus.

Motivation: Often, people might not want to work with a big corpus, but only with a small subset. This might be because they do not have the computational resources or just want to quickly test something. If everyone chooses a different subset, annotations cannot be re-used. Standardizing the subset selection could help with that.

Implementation: We can tag documents to indicate that they belong to a subset of the corpus. To select subcorpora representatively, an option would be to use the hash of the document ID. We can then make subsets that correspond to e.g. a 10th or a 100th of the corpus. The subcorpora should be nested. That way, if someone ran a spotter over a 10th of the corpus, someone else who only works with a 100th of the corpus can still use the results.

class spotterbase.plugins.model_extra.corpus_frac.FRAC_CORPUS

Bases: Vocabulary

NS: NameSpace = NameSpace(https://ns.mathhub.info/project/sb/ext/fraccorpus/, prefix=fraccorpus:)
centi: Uri = Uri('https://ns.mathhub.info/project/sb/ext/fraccorpus/centi')
deci: Uri = Uri('https://ns.mathhub.info/project/sb/ext/fraccorpus/deci')
decimilli: Uri = Uri('https://ns.mathhub.info/project/sb/ext/fraccorpus/decimilli')
milli: Uri = Uri('https://ns.mathhub.info/project/sb/ext/fraccorpus/milli')

spotterbase.plugins.model_extra.declarations module

class spotterbase.plugins.model_extra.declarations.DECL

Bases: Vocabulary

Identifier: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/Identifier')
IdentifierDeclaration: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/IdentifierDeclaration')
IdentifierOccurrence: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/IdentifierOccurrence')
IdentifierTypeRestriction: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/IdentifierTypeRestriction')
NS: NameSpace = NameSpace(https://ns.mathhub.info/project/sb/ext/decl/, prefix=decl:)
declares: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/declares')
hasPolarity: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/hasPolarity')
idString: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/idString')
occurrenceOf: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/occurrenceOf')
restricts: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/restricts')
class spotterbase.plugins.model_extra.declarations.DECL_PRED

Bases: object

declares = PredInfo(uri=Uri('https://ns.mathhub.info/project/sb/ext/decl/declares'), is_rdf_list=False, literal_type=None, is_reversed=False, json_ld_term='decl:declares', json_ld_type_is_id=True)
hasPolarity = PredInfo(uri=Uri('https://ns.mathhub.info/project/sb/ext/decl/hasPolarity'), is_rdf_list=False, literal_type=None, is_reversed=False, json_ld_term='decl:hasPolarity', json_ld_type_is_id=True)
idString = PredInfo(uri=Uri('https://ns.mathhub.info/project/sb/ext/decl/idString'), is_rdf_list=False, literal_type=Uri('http://www.w3.org/2001/XMLSchema#string'), is_reversed=False, json_ld_term='decl:idString', json_ld_type_is_id=False)
occurrenceOf = PredInfo(uri=Uri('https://ns.mathhub.info/project/sb/ext/decl/occurrenceOf'), is_rdf_list=False, literal_type=None, is_reversed=False, json_ld_term='decl:occurrenceOf', json_ld_type_is_id=True)
restricts = PredInfo(uri=Uri('https://ns.mathhub.info/project/sb/ext/decl/restricts'), is_rdf_list=False, literal_type=None, is_reversed=False, json_ld_term='decl:restricts', json_ld_type_is_id=True)
class spotterbase.plugins.model_extra.declarations.Identifier(uri: Uri | None = None, id_string: str | None = None)

Bases: Record

id_string: str | None = None
record_info: ClassVar[RecordInfo] = <spotterbase.records.record.RecordInfo object>
class spotterbase.plugins.model_extra.declarations.IdentifierDeclaration(uri: Uri | None = None, declares: Uri | None = None, polarity: Uri | None = None)

Bases: Record

declares: Uri
polarity: Uri
record_info: ClassVar[RecordInfo] = <spotterbase.records.record.RecordInfo object>
class spotterbase.plugins.model_extra.declarations.IdentifierOccurrence(uri: Uri | None = None, occurrence_of: Uri | None = None)

Bases: Record

occurrence_of: Uri
record_info: ClassVar[RecordInfo] = <spotterbase.records.record.RecordInfo object>
class spotterbase.plugins.model_extra.declarations.IdentifierTypeRestriction(uri: Uri | None = None, restricts: Uri | None = None)

Bases: Record

record_info: ClassVar[RecordInfo] = <spotterbase.records.record.RecordInfo object>
restricts: Uri
class spotterbase.plugins.model_extra.declarations.PolarityVocab

Bases: Vocabulary

NS: NameSpace = NameSpace(https://ns.mathhub.info/project/sb/ext/decl/polarity/, prefix=None)
existential: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/polarity/existential')
universal: Uri = Uri('https://ns.mathhub.info/project/sb/ext/decl/polarity/universal')

Module contents

spotterbase.plugins.model_extra.load()