11. An encoding method comprising: generating a plurality of pieces of syntax information respectively corresponding to a plurality of words in a compression target document by analyzing relationships between the plurality of words by a processor; assigning a plurality of compression codes to the plurality of words and to the plurality of pieces of syntax information by the processor; and outputting the plurality of compression codes with an arrangement of a specific order by the processor.
14. The encoding method according to claim 11 , wherein the plurality of pieces of syntax information are information in which a tree structure of a syntax tree indicating a relationship between the plurality of words is expressed using a plurality of subtrees.