add rules.py

add rules to classify the data from xml to improve the probability of
the items