Charty/download/files/ChartyPy.py
def fundamentalRule():
   """The fundamental rule of chart parsing generates new edges by
      combining fitting active and inactive edges."""
   change = 0
   for aedge in chart:
      if isActive(aedge):
         for k in range(len(chart)):
            if isInactive(chart[k]):
               if match(aedge, chart[k]):
                  newedge = aedge[:]
                  newedge[5] = aedge[5][:]
                  newedge[5].append(k)
                  newedge[1] = chart[k][1]
                  newedge[2] = newedge[2] + 1
                  if newedge not in chart:
                     chart.append(newedge[:])
                     change = 1
                     if DEBUG:
                        print "FR Adding edge:", newedge
   return change
The fundamental rule of chart parsing generates new edges by
      combining fitting active and inactive edges.
The fundamental rule of chart parsing generates new edges by
combining fitting active and inactive edges.
The fundamental rule of chart parsing generates new edges by combining fitting active and inactive edges .
def fundamentalRule():
   change = 0
   for aedge in chart:
      if isActive(aedge):
         for k in range(len(chart)):
            if isInactive(chart[k]):
               if match(aedge, chart[k]):
                  newedge = aedge[:]
                  newedge[5] = aedge[5][:]
                  newedge[5].append(k)
                  newedge[1] = chart[k][1]
                  newedge[2] = newedge[2] + 1
                  if newedge not in chart:
                     chart.append(newedge[:])
                     change = 1
                     if DEBUG:
                        print "FR Adding edge:", newedge
   return change
def fundamentalRule ( ) : change = 0 for aedge in chart : if isActive ( aedge ) : for k in range ( len ( chart ) ) : if isInactive ( chart [ k ] ) : if match ( aedge , chart [ k ] ) : newedge = aedge [ : ] newedge [ 5 ] = aedge [ 5 ] [ : ] newedge [ 5 ] . append ( k ) newedge [ 1 ] = chart [ k ] [ 1 ] newedge [ 2 ] = newedge [ 2 ] + 1 if newedge not in chart : chart . append ( newedge [ : ] ) change = 1 if DEBUG : print "FR Adding edge:" , newedge return change
The fundamental rule of chart parsing generates new edges by
combining fitting active and inactive edges.
The fundamental rule of chart parsing generates new edges by combining fitting active and inactive edges .
"""The fundamental rule of chart parsing generates new edges by
      combining fitting active and inactive edges."""