How to use the prosodic.lib.Parse.Bounding function in prosodic

To help you get started, we’ve selected a few prosodic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
if mark < parse.constraintScores[constraint]:
				containsLesserViolation = True

		if containsGreaterViolation:
		
			if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations
				
			else:
				return Bounding.bounded # contains only greater violations
				
		else:
		
			if containsLesserViolation:
				return Bounding.bounds # contains only lesser violations
				
			else:
				return Bounding.equal # contains neither greater nor lesser violations
github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
#print str(mark)+"\t"+str(mark2)
			
			if mark > parse.constraintScores[constraint]:
				containsGreaterViolation = True
				
			if mark < parse.constraintScores[constraint]:
				containsLesserViolation = True

		if containsGreaterViolation:
		
			if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations
				
			else:
				return Bounding.bounded # contains only greater violations
				
		else:
		
			if containsLesserViolation:
				return Bounding.bounds # contains only lesser violations
				
			else:
				return Bounding.equal # contains neither greater nor lesser violations
github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
#print str(mark)+"\t"+str(mark2)

			if mark > parse.constraintScores[constraint]:
				containsGreaterViolation = True

			if mark < parse.constraintScores[constraint]:
				containsLesserViolation = True

		if containsGreaterViolation:

			if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations

			else:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]),self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]))
				return Bounding.bounded # contains only greater violations

		else:

			if containsLesserViolation:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]),parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]))
				return Bounding.bounds # contains only lesser violations

			else:
				return Bounding.equal # contains neither greater nor lesser violations
github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
for constraint in self.constraints:
			mark = self.constraintScores[constraint]
			mark2 = parse.constraintScores[constraint]
			
			#print str(mark)+"\t"+str(mark2)
			
			if mark > parse.constraintScores[constraint]:
				containsGreaterViolation = True
				
			if mark < parse.constraintScores[constraint]:
				containsLesserViolation = True

		if containsGreaterViolation:
		
			if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations
				
			else:
				return Bounding.bounded # contains only greater violations
				
		else:
		
			if containsLesserViolation:
				return Bounding.bounds # contains only lesser violations
				
			else:
				return Bounding.equal # contains neither greater nor lesser violations
github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
if containsGreaterViolation:
		
			if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations
				
			else:
				return Bounding.bounded # contains only greater violations
				
		else:
		
			if containsLesserViolation:
				return Bounding.bounds # contains only lesser violations
				
			else:
				return Bounding.equal # contains neither greater nor lesser violations
github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations

			else:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]),self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]))
				return Bounding.bounded # contains only greater violations

		else:

			if containsLesserViolation:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]),parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]))
				return Bounding.bounds # contains only lesser violations

			else:
				return Bounding.equal # contains neither greater nor lesser violations
github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
for constraint in self.constraints:
			mark = self.constraintScores[constraint]
			mark2 = parse.constraintScores[constraint]

			#print str(mark)+"\t"+str(mark2)

			if mark > parse.constraintScores[constraint]:
				containsGreaterViolation = True

			if mark < parse.constraintScores[constraint]:
				containsLesserViolation = True

		if containsGreaterViolation:

			if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations

			else:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]),self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]))
				return Bounding.bounded # contains only greater violations

		else:

			if containsLesserViolation:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]),parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]))
				return Bounding.bounds # contains only lesser violations

			else:
				return Bounding.equal # contains neither greater nor lesser violations
github quadrismegistus / prosodic / prosodic / lib / Parse.py View on Github external
containsLesserViolation = True

		if containsGreaterViolation:

			if containsLesserViolation:
				return Bounding.unequal # contains both greater and lesser violations

			else:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]),self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]))
				return Bounding.bounded # contains only greater violations

		else:

			if containsLesserViolation:
				##logging.debug('Parse1: %s\nViols1: %s\n--bounds-->\nParse2: %s\nViols2: %s',self,str([(k,v) for k,v in sorted(self.constraintCounts.items()) if v]),parse,str([(k,v) for k,v in sorted(parse.constraintCounts.items()) if v]))
				return Bounding.bounds # contains only lesser violations

			else:
				return Bounding.equal # contains neither greater nor lesser violations