pycl/Code/Charty/Charty.py
def fundamentalRule():
	"""The fundamental rule of chart parsing generates new edges by
	   combining fitting active and inactive edges."""
	global chart
	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(copy(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():
	global chart
	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(copy(newedge))
							change = 1
							if DEBUG:
								print "FR Adding edge:", newedge
	return change
def fundamentalRule ( ) : global chart 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 ( copy ( 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."""