Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

case-insensitive check for doc=NA

  • Loading branch information...
commit 2a75fde285d107c4154ae73d3d9644cf2e375c5b 1 parent c436094
@jelsas authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 pairwise_pref_eval.py
View
4 pairwise_pref_eval.py
@@ -52,12 +52,12 @@ def add_edge(self, from_vertex, to_vertex, weight = 1):
ValueError is raised if an edge is added where the preferred document has
previously been added as BAD, or if a BAD document is added that has been
previously preferred.'''
- if from_vertex == 'na':
+ if from_vertex.lower() == 'na':
if to_vertex in self.preferred_docs:
raise ValueError('Doc %s can not be both preferred & bad' % to_vertex)
self.bad_docs.add(to_vertex)
- elif to_vertex == 'na':
+ elif to_vertex.lower() == 'na':
if from_vertex in self.preferred:
raise ValueError('Doc %s can not be both preferred & bad' % from_vertex)
self.bad_docs.add(from_vertex)
Please sign in to comment.
Something went wrong with that request. Please try again.