1.1 --- a/iixr/data.py Sun Jan 10 20:47:41 2010 +0100
1.2 +++ b/iixr/data.py Sat Nov 20 00:00:01 2010 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Variable-length integer functions.
1.6
1.7 -Copyright (C) 2009 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2009, 2010 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -65,6 +65,13 @@
1.13 else:
1.14 bytes.append(number)
1.15
1.16 +def string_to_array(s, bytes):
1.17 +
1.18 + "Write the given string 's' to 'bytes'."
1.19 +
1.20 + vint_to_array(len(s), bytes)
1.21 + bytes.fromstring(s.encode("utf-8"))
1.22 +
1.23 for i in xrange(0, 65536):
1.24 bytes = array('B')
1.25 _vint_to_array(i, bytes)
2.1 --- a/iixr/index.py Sun Jan 10 20:47:41 2010 +0100
2.2 +++ b/iixr/index.py Sat Nov 20 00:00:01 2010 +0100
2.3 @@ -193,8 +193,8 @@
2.4 def find_positions(self, term):
2.5 return self.dict_reader.find_positions(term)
2.6
2.7 - def find_common_positions(self, term):
2.8 - return self.dict_reader.find_common_positions(term)
2.9 + def find_common_positions(self, terms):
2.10 + return self.dict_reader.find_common_positions(terms)
2.11
2.12 def get_frequency(self, term):
2.13 return self.dict_reader.get_frequency(term)