Large deviation properties for pattern statistics in primitive rational models