The purpose of the present invention is to accurately extract, from text, an attribute-value pair for a numerical attribute, which takes a numerical value. This natural language processing device extracts attribute-value pairs from correct text and calculates the validity of association between each attribute and an unknown numerical value on the basis of the distribution of values of the attribute. The calculation of the validity for each attribute is accomplished by determining a distribution most similar to the distribution of values of the attribute in the correct text and then using this determined distribution. When a plurality of attribute values are subjected to this attribute-value validity calculation, relationships between attributes, as well as relationships between attributes and values, are learned from the correct text to determine appropriate pairs.