QNLP  v1.0
QNLP.tagging.word_types.AdjointType Class Reference
Inheritance diagram for QNLP.tagging.word_types.AdjointType:
Inheritance graph
Collaboration diagram for QNLP.tagging.word_types.AdjointType:
Collaboration graph

Public Member Functions

def __init__ (self, label, isAdj, adjOrder=0)
 
def __str__ (self)
 

Data Fields

 isAdj
 
 adjOrder
 
 label
 

Detailed Description

Definition at line 26 of file word_types.py.

Constructor & Destructor Documentation

◆ __init__()

def QNLP.tagging.word_types.AdjointType.__init__ (   self,
  label,
  isAdj,
  adjOrder = 0 
)

Definition at line 27 of file word_types.py.

27  def __init__(self, label, isAdj, adjOrder=0):
28  super().__init__(label)
29  self.isAdj = isAdj
30  if isAdj:
31  assert (adjOrder!=0)
32  self.adjOrder = adjOrder
33 

Member Function Documentation

◆ __str__()

def QNLP.tagging.word_types.AdjointType.__str__ (   self)

Reimplemented from QNLP.tagging.word_types.PregroupType.

Definition at line 34 of file word_types.py.

34  def __str__(self):
35  adj_order_str = ""
36  if self.isAdj:
37  adj_order_str = "^"
38 
39  for ii in range(abs(self.adjOrder)):
40  adj_order_str += 'l' if self.adjOrder < 0 else 'r'
41 
42  return super().__str__() + ": ADJ=" + str(self.isAdj) + " ORD=" + adj_order_str
43 

References QNLP.tagging.word_types.AdjointType.adjOrder, and QNLP.tagging.word_types.AdjointType.isAdj.

Field Documentation

◆ adjOrder

QNLP.tagging.word_types.AdjointType.adjOrder

Definition at line 32 of file word_types.py.

Referenced by QNLP.tagging.word_types.AdjointType.__str__().

◆ isAdj

QNLP.tagging.word_types.AdjointType.isAdj

Definition at line 29 of file word_types.py.

Referenced by QNLP.tagging.word_types.AdjointType.__str__().

◆ label

QNLP.tagging.word_types.PregroupType.label
inherited

Definition at line 17 of file word_types.py.

Referenced by QNLP.tagging.word_types.PregroupType.__str__().


The documentation for this class was generated from the following file: