geneeanlpclient.common package

Universal Dependencies and Features

Constants relevant to Universal Dependencies.

For tag to feature conversion use conversions available at see http://universaldependencies.org/docs/tagset-conversion/index.html

class geneeanlpclient.common.ud.UDep(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Universal syntactic dependencies V2 and V1. See http://universaldependencies.org/u/dep/all.html

ACL = 15

clausal modifier of noun (adjectival clause)

ADVCL = 14

adverbial clause modifier

ADVMOD = 16

adverbial modifier

AMOD = 18

adjectival modifier

APPOS = 9

appositional modifier

AUX = 19

auxiliary

AUXPASS = 38

passive auxiliary (V1)

CASE = 24

case marking

CC = 26

coordinating conjunction

CCOMP = 12

clausal complement

CLF = 23

classifier (V2)

COMPOUND = 29

compound

CONJ = 25

conjunct

COP = 20
CSUBJ = 11

clausal subject

CSUBJPASS = 39

clausal passive subject (V1)

DEP = 37

unspecified dependency

DET = 22

determiner

DISCOURSE = 17

discourse element

DISLOCATED = 7

dislocated elements

DOBJ = 40

direct object (V1; in V2 as obj)

EXPL = 6

expletive

FIXED = 27

fixed multiword expression (V2)

FLAT = 28

flat multiword expressio (V2)

FOREIGN = 41

foreign words (V1)

GOESWITH = 33

goes with

IOBJ = 3

indirect object

LIST = 30

list

MARK = 21
MWE = 42

multi-word expression (V1)

NAME = 43

name (V1)

NEG = 44

negation modifier (V1)

NMOD = 8

nominal modifier

NSUBJ = 1

nominal subject

NSUBJPASS = 45

passive nominal subject (V1)

NUMMOD = 10

numeric modifier

OBJ = 2

object (V2)

OBL = 4

oblique nominal (V2)

ORPHAN = 32

orphan (V2)

PARATAXIS = 31

parataxis

PUNCT = 35

punctuation

REMNANT = 46

remnant in ellipsis (V1)

REPARANDUM = 34

overridden disfluency

ROOT = 36

root

VOCATIVE = 5

vocative

XCOMP = 13

open clausal complement

static fromStr(depStr: str) UDep[source]

Conversion from string with DEP as a fallback for unknown values

Parameters

depStr (str) – UDep as a string

Returns

corresponding UDep member or UDep.DEP

toStr() str[source]

Conversion from the enum value to the string value used by the API (the only difference is that the API uses lower case strings)

geneeanlpclient.common.ud.UFeats

TYpe of universal features (generally a multimap from feature names to potentially multiple feature valeus)

alias of Mapping[str, List[str]]

class geneeanlpclient.common.ud.UPos(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Universal POS tags. See http://universaldependencies.org/u/pos/all.html

ADJ = 1

adjective

ADP = 7

adposition (preposition or postposition)

ADV = 2

adverb

AUX = 8

auxiliary

CCONJ = 9

coordianting conjunction

DET = 10

determiner

INTJ = 3

interjection

NOUN = 4

noun

NUM = 11

numeral

PART = 13

particle

PRON = 12

pronoun

PROPN = 5

proper noun

PUNCT = 15

punctuation

SCONJ = 14

subordinating conjunction

SYM = 16

symbol

VERB = 6

verb

X = 17

other

static fromStr(posStr: str) UPos[source]

Conversion from string with X as a fallback for unknown values

Parameters

posStr (str) – PoS as a string

Returns

corresponding UPos member or UPos.X

toStr() str[source]

Conversion from the enum value to the string value used by the API.