The 47k combined with the humidity sensor makes a voltage divider, the 47k pulls to ground and the humid sensor pulls to V+.
The 339 is a quad comparator, your just using 2, which ever input is highest voltage wise controls the output, if + is higher than - the output is high or +, if - is higher than + then the output is - or low.
Look like the pair of comparators are being used to tell if the humidity is within a certain range, adjustable by the 2 10k pots.
As mike just said allthough this circuit may work the sensor isnt going to last that long, youd be better generating a frequency with it using something like a 555 chip and reading that with the uC.