﻿{"id":186,"date":"2012-01-31T14:07:40","date_gmt":"2012-01-31T05:07:40","guid":{"rendered":"http:\/\/fujiitoshiki.com\/improvesociety\/?p=186"},"modified":"2014-08-09T16:15:39","modified_gmt":"2014-08-09T07:15:39","slug":"post-186","status":"publish","type":"post","link":"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=186","title":{"rendered":"Classify the Item_Number of the &#8216;Standard Tables of Food Composition in Japan 2010&#8217;"},"content":{"rendered":"<div class=\"theContentWrap-ccc\"><p>I have released \u2018Standard Tables of Food Composition in Japan 2010\u2032 on Jan. 18, 2012. However, I did not classify which Item_Number is categorized into food groups or derived from any organism.<\/p>\n<p>In this contents, I have described incomplete way how to classify them.<\/p>\n<p>Example 1 shows that the code exports Item_Number, major category, medium category, minor category and details. Please note that the tree structures is not complete.<\/p>\n<p>Example 2 shows complete tree structures. However, I could not write the complete code with recursion.<\/p>\n<h5>Example 1. Incomplete data<\/h5>\n<table border=\"0\">\n<thead>\n<tr style=\"background-color: #848484;\">\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: x-small;\">Item Number<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: x-small;\">Major Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: x-small;\">Medium Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: x-small;\">Minor Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: x-small;\">Major Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: x-small;\">Medium Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: x-small;\">Minor Category<\/span><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small; font-family: georgia, palatino;\">01012<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: 'times new roman', times; color: #000000;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: 'times new roman', times; color: #000000;\">[\u7384\u7a40]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: 'times new roman', times; color: #000000;\">\u56fd\u7523<\/span><\/td>\n<td><span style=\"font-size: x-small; color: #000000; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; color: #000000; font-family: georgia, palatino;\">[Whole grain]<\/span><\/td>\n<td><span style=\"font-size: x-small; color: #000000; font-family: georgia, palatino;\">Domestic<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small; font-family: georgia, palatino;\">01013<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\">\u8f38\u5165<\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Imported<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01014<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\">\u8f38\u5165<\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\">Imported<\/span><\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01015<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u8584\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat \u00a0flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Soft flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01016\u00a0<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u8584\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Soft flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01018<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u4e2d\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Medium flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01019<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u00a0<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u4e2d\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Medium flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01020<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td valign=\"middle\"><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u5f37\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Hard flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01021<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u5f37\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Hard flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01023<\/span>\u00a0<\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u5f37\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Hard flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01024<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u30d7\u30ec\u30df\u30c3\u30af\u30b9\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Premixed flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01025<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u30d7\u30ec\u30df\u30c3\u30af\u30b9\u7c89<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\"><br \/><\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Premixed flour<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example 2. Complete data<\/h5>\n<table border=\"0\">\n<thead>\n<tr style=\"background-color: #848484;\">\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: small;\">Item Number<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: small;\">Major Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: small;\">Medium Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: small;\">Minor Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: small;\">Major Category<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: small;\">MediumCategory<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino; font-size: small;\">MinorCategory<\/span><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small; color: #000000; font-family: georgia, palatino;\">01012<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: 'times new roman', times; color: #000000;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: 'times new roman', times; color: #000000;\">[\u7384\u7a40]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: 'times new roman', times; color: #000000;\">\u56fd\u7523<\/span><\/td>\n<td><span style=\"font-size: x-small; color: #000000; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; color: #000000; font-family: georgia, palatino;\">[Whole grain]<\/span><\/td>\n<td><span style=\"font-size: x-small; color: #000000; font-family: georgia, palatino;\">Domestic<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small; font-family: georgia, palatino;\">01013<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u7384\u7a40]<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\">\u8f38\u5165<\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Whole grain]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Imported<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01014<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u7384\u7a40]<\/span><\/td>\n<td><span style=\"font-size: xx-small;\"><span style=\"line-height: 15px;\">\u8f38\u5165<\/span><\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Whole grain]<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino; font-size: xx-small;\"><span style=\"line-height: 15px;\">Imported<\/span><\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01015<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u8584\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat \u00a0flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Soft flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01016\u00a0<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u8584\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Soft flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01018<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u4e2d\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Medium flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01019<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u00a0\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u4e2d\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Medium flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01020<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td valign=\"middle\"><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u5f37\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Whole flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Hard flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01021<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u5f37\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Hard flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01023<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u5f37\u529b\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Hard flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><span style=\"font-size: small;\">01024<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u30d7\u30ec\u30df\u30c3\u30af\u30b9\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Premixed flour<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #cccccc;\">\n<td><span style=\"font-size: small;\">01025<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u3053\u3080\u304e<\/span><\/td>\n<td><span style=\"font-size: x-small;\">[\u5c0f\u9ea6\u7c89]<\/span><\/td>\n<td><span style=\"font-size: x-small;\">\u30d7\u30ec\u30df\u30c3\u30af\u30b9\u7c89<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Wheat<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">[Wheat flour]<\/span><\/td>\n<td><span style=\"font-size: x-small; font-family: georgia, palatino;\">Premixed flour<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Please copy text from the PDF files and paste to EXCEL worksheet by such procedure as described in <a href=\"\/\/fujiitoshiki.com\/improvesociety\/?p=51\" target=\"_blank\">this content<\/a>. Press &#8216;Alt&#8217; key and &#8216;F11&#8217; key to load VBE. Run the following code:<\/p>\n<pre class=\"lang:vb decode:true \" >\r\nOption Explicit\r\nSub ItemNum()\r\nDim mySht           As Worksheet\r\nDim myRng           As Range\r\nDim i               As Long\r\nDim j               As Long\r\nDim k               As Long\r\nDim tmpAr           As Variant\r\nDim myItem()        As String\r\nDim myNum1()        As String\r\nDim myNum2()        As String\r\nDim ItemNumAr()     As String\r\nDim myCancel()      As String\r\nDim Cancel_Ar()     As String\r\nDim myAr()          As String\r\nDim myAr2()         As String\r\nDim myGroupNamJP()  As String\r\nDim myGroupNumJP()  As String\r\nDim myGroupNamEN()  As String\r\nDim myGroupNumEN()  As String\r\nDim GroupAr()       As String\r\nDim myRegExp1       As Object\r\nDim myRegExp2       As Object\r\nDim myStrPtn        As String\r\nDim myStrPtn2       As String\r\nConst startStrPtn   As String = \"^(1\\\\)|residues)$\"\r\nDim tmpStrJ         As String\r\nDim tmpStrE         As String\r\nConst endStrPtn     As String = \"[0-9]\\\\)$\"\r\nConst JapStrPtn     As String = \"([\u3041-\u30f6]|[\u4e9c-\u9ed1])+$\"\r\nDim myStr           As String\r\nSet mySht = ActiveSheet\r\nSet myRng = Application.Intersect(mySht.Range(\"A:F\"), _\r\n                                    mySht.UsedRange)\r\ntmpAr = myRng\r\nSet myRegExp1 = CreateObject(\"VBScript.RegExp\")\r\nmyStrPtn = \"^[0-9]{5}$\"\r\nWith myRegExp1\r\n    .Pattern = myStrPtn\r\n    .IgnoreCase = True\r\n    .Global = True\r\nEnd With\r\nSet myRegExp2 = CreateObject(\"VBScript.RegExp\")\r\nWith myRegExp2\r\n    .Pattern = startStrPtn\r\n    .IgnoreCase = True\r\n    .Global = True\r\nEnd With\r\nj = 0\r\nFor i = LBound(tmpAr) To UBound(tmpAr)\r\n    If myRegExp1.Test(tmpAr(i, 1)) And _\r\n       tmpAr(i, 2) <> \"\uff08\u6b20\u756a\uff09\" Then\r\n        ReDim Preserve myItem(j)\r\n        ReDim Preserve myNum1(j)\r\n        myItem(j) = tmpAr(i, 1)\r\n        myNum1(j) = i\r\n    Else\r\n        j = j - 1\r\n    End If\r\n    j = j + 1\r\nNext i\r\nReDim ItemNumAr(j - 1, 2)\r\n    ItemNumAr(LBound(ItemNumAr), 0) = myItem(LBound(ItemNumAr))\r\n    ItemNumAr(LBound(ItemNumAr), 1) = 7\r\n    ItemNumAr(LBound(ItemNumAr), 2) = myNum1(LBound(ItemNumAr))\r\nFor k = LBound(ItemNumAr) + 1 To UBound(ItemNumAr)\r\n    ItemNumAr(k, 0) = myItem(k)\r\n    ItemNumAr(k, 1) = myNum1(k - 1) + 1\r\n    ItemNumAr(k, 2) = myNum1(k)\r\nNext k\r\nErase myItem\r\nErase myNum1\r\nj = 0\r\nFor i = LBound(tmpAr) To UBound(tmpAr)\r\n    If myRegExp2.Test(tmpAr(i, 1)) _\r\n    Then\r\n        ReDim Preserve myItem(j)\r\n        ReDim Preserve myNum1(i)\r\n        myItem(j) = tmpAr(i, 1)\r\n        myNum1(j) = i\r\n    Else\r\n        j = j - 1\r\n    End If\r\n    j = j + 1\r\nNext i\r\nReDim myCancel(UBound(myItem), 1)\r\nFor k = LBound(myCancel) To UBound(myCancel)\r\n    myCancel(k, 0) = myItem(k)\r\n    myCancel(k, 1) = myNum1(k)\r\nNext k\r\nErase myItem\r\nErase myNum1\r\nReDim Preserve myCancel(UBound(myCancel), 2)\r\nj = 0\r\nFor i = LBound(myCancel) To UBound(myCancel) - 1\r\n    If myCancel(i, 0) = \"1)\" Then\r\n        If myCancel(i + 2, 0) = \"residues\" Then\r\n            myCancel(i, 2) = myCancel(i + 2, 1)\r\n        Else\r\n            myCancel(i, 2) = myCancel(i + 1, 1)\r\n        End If\r\n    Else\r\n        j = j - 1\r\n    End If\r\n    j = j + 1\r\nNext i\r\nReDim Cancel_Ar(j - 1, 2)\r\nj = 0\r\nFor i = LBound(myCancel) To UBound(myCancel) - 1\r\n    If myCancel(i, 0) = \"1)\" Then\r\n        Cancel_Ar(j, 0) = myCancel(i, 0)\r\n        Cancel_Ar(j, 1) = myCancel(i, 1)\r\n        Cancel_Ar(j, 2) = myCancel(i, 2)\r\n    Else\r\n        j = j - 1\r\n    End If\r\n    j = j + 1\r\nNext i\r\nk = 0\r\nReDim myItem(k)\r\nReDim myNum1(k)\r\nReDim myNum2(k)\r\nFor i = LBound(ItemNumAr) To UBound(ItemNumAr)\r\n    ReDim Preserve myItem(k)\r\n    ReDim Preserve myNum1(k)\r\n    ReDim Preserve myNum2(k)\r\n    For j = LBound(Cancel_Ar) To UBound(Cancel_Ar)\r\n        If CLng(ItemNumAr(i, 1)) < CLng(Cancel_Ar(j, 1)) And _\r\n                                   CLng(Cancel_Ar(j, 1)) < CLng(ItemNumAr(i, 2)) And _\r\n           CLng(ItemNumAr(i, 1)) < CLng(Cancel_Ar(j, 2)) And _\r\n                                   CLng(Cancel_Ar(j, 2)) < CLng(ItemNumAr(i, 2)) _\r\n        Then\r\n            If Cancel_Ar(j, 1) - ItemNumAr(i, 1) < 3 Then\r\n                myItem(k) = ItemNumAr(i, 0)\r\n                myNum1(k) = Cancel_Ar(j, 2)\r\n                myNum2(k) = ItemNumAr(i, 2)\r\n            Else\r\n                myNum2(k) = Cancel_Ar(j, 1)\r\n                k = k + 1\r\n                ReDim Preserve myItem(k)\r\n                ReDim Preserve myNum1(k)\r\n                ReDim Preserve myNum2(k)\r\n                myItem(k) = ItemNumAr(i, 0)\r\n                myNum1(k) = Cancel_Ar(j, 2)\r\n                myNum2(k) = ItemNumAr(i, 2)\r\n            End If\r\n        Else\r\n            myItem(k) = ItemNumAr(i, 0)\r\n            myNum1(k) = ItemNumAr(i, 1)\r\n            myNum2(k) = ItemNumAr(i, 2)\r\n        End If\r\n    Next j\r\n    k = k + 1\r\nNext i\r\nReDim myAr(UBound(myItem), 2)\r\nFor i = LBound(myAr) To UBound(myAr)\r\n    myAr(i, 0) = myItem(i)\r\n    myAr(i, 1) = myNum1(i)\r\n    myAr(i, 2) = myNum2(i)\r\nNext i\r\nErase myItem\r\nErase myNum1\r\nErase myNum2\r\nmyStrPtn2 = \"^(\\\\[|\\\\()?[a-zA-Z]+\"\r\nWith myRegExp1\r\n    .Pattern = myStrPtn2\r\n    .IgnoreCase = True\r\n    .Global = True\r\nEnd With\r\nk = 0\r\nFor i = LBound(tmpAr) To UBound(tmpAr)\r\n    For j = LBound(myAr) To UBound(myAr)\r\n        If CLng(myAr(j, 1)) < i And _\r\n           CLng(myAr(j, 2)) > i And _\r\n           myRegExp1.Test(tmpAr(i, 1)) _\r\n        Then\r\n            ReDim Preserve myGroupNamJP(k)\r\n            ReDim Preserve myGroupNumJP(k)\r\n            ReDim Preserve myGroupNamEN(k)\r\n            ReDim Preserve myGroupNumEN(k)\r\n            myGroupNamJP(k) = tmpAr(i - 1, 1) &amp; _\r\n                           tmpAr(i - 1, 2) &amp; _\r\n                           tmpAr(i - 1, 3) &amp; _\r\n                           tmpAr(i - 1, 4) &amp; _\r\n                           tmpAr(i - 1, 5) &amp; _\r\n                           tmpAr(i - 1, 6)\r\n            myGroupNumJP(k) = i - 1\r\n            myGroupNamEN(k) = RTrim(tmpAr(i, 1) &amp; \" \" &amp; _\r\n                         Replace(tmpAr(i, 2), \"*\", \"\") &amp; \" \" &amp; _\r\n                         Replace(tmpAr(i, 3), \"*\", \"\") &amp; \" \" &amp; _\r\n                         Replace(tmpAr(i, 4), \"*\", \"\") &amp; \" \" &amp; _\r\n                         Replace(tmpAr(i, 5), \"*\", \"\") &amp; \" \" &amp; _\r\n                         Replace(tmpAr(i, 6), \"*\", \"\"))\r\n            myGroupNumEN(k) = i\r\n        Else\r\n            k = k - 1\r\n        End If\r\n        k = k + 1\r\n    Next j\r\nNext i\r\nReDim GroupAr(UBound(myGroupNamJP), 3)\r\nFor i = LBound(GroupAr) To UBound(GroupAr)\r\n    GroupAr(i, 0) = myGroupNamJP(i)\r\n    GroupAr(i, 1) = myGroupNumJP(i)\r\n    GroupAr(i, 2) = myGroupNamEN(i)\r\n    GroupAr(i, 3) = myGroupNumEN(i)\r\nNext i\r\nErase myGroupNamJP\r\nErase myGroupNumJP\r\nErase myGroupNamEN\r\nErase myGroupNumEN\r\nk = 0\r\nFor i = LBound(GroupAr) To UBound(GroupAr)\r\n    ReDim Preserve myGroupNamJP(k)\r\n    ReDim Preserve myGroupNumJP(k)\r\n    ReDim Preserve myGroupNamEN(k)\r\n    ReDim Preserve myGroupNumEN(k)\r\n    myGroupNamJP(k) = GroupAr(i, 0)\r\n    myGroupNumJP(k) = GroupAr(i, 1)\r\n    myGroupNamEN(k) = GroupAr(i, 2)\r\n    myGroupNumEN(k) = GroupAr(i, 3)\r\n    k = k + 1\r\n    For j = LBound(Cancel_Ar) To UBound(Cancel_Ar)\r\n        If CLng(Cancel_Ar(j, 1)) < CLng(GroupAr(i, 1)) And _\r\n           CLng(GroupAr(i, 1)) < CLng(Cancel_Ar(j, 2)) _\r\n        Then\r\n            k = k - 1\r\n        End If\r\n    Next j\r\nNext i\r\nReDim GroupAr(UBound(myGroupNamJP), 3)\r\nWith myRegExp1\r\n    .Pattern = endStrPtn\r\n    .IgnoreCase = True\r\n    .Global = True\r\nEnd With\r\nWith myRegExp2\r\n    .Pattern = JapStrPtn\r\n    .IgnoreCase = True\r\n    .Global = True\r\nEnd With\r\nFor i = LBound(GroupAr) To UBound(GroupAr)\r\n    myGroupNamJP(i) = myRegExp1.Replace(myGroupNamJP(i), \"\")\r\n    myGroupNamEN(i) = myRegExp1.Replace(myGroupNamEN(i), \"\")\r\n    myGroupNamEN(i) = RTrim(myRegExp2.Replace(myGroupNamEN(i), \"\"))\r\n    GroupAr(i, 0) = myGroupNamJP(i)\r\n    GroupAr(i, 1) = myGroupNumJP(i)\r\n    GroupAr(i, 2) = myGroupNamEN(i)\r\n    GroupAr(i, 3) = myGroupNumEN(i)\r\nNext i\r\nReDim Preserve myAr(UBound(myAr), 5)\r\nReDim myAr2(UBound(myAr), 3)\r\nFor i = LBound(myAr) To UBound(myAr)\r\n    tmpStrJ = \"\"\r\n    tmpStrE = \"\"\r\n    myAr2(i, 0) = myAr(i, 0)\r\n    For j = LBound(GroupAr) To UBound(GroupAr)\r\n        If CLng(myAr(i, 1)) < CLng(GroupAr(j, 1)) And _\r\n                              CLng(GroupAr(j, 3)) < CLng(myAr(i, 2)) Then\r\n            tmpStrJ = tmpStrJ &amp; GroupAr(j, 0)\r\n            tmpStrE = RTrim(tmpStrE &amp; \" \" &amp; GroupAr(j, 2))\r\n            myAr(i, 4) = GroupAr(j, 1)\r\n        End If\r\n    Next j\r\n    If tmpStrJ = \"\" Then\r\n        myAr(i, 3) = myAr(i - 1, 3)\r\n        myAr(i, 4) = myAr(i - 1, 4)\r\n        myAr(i, 5) = myAr(i - 1, 5)\r\n        myAr2(i, 1) = myAr(i - 1, 3)\r\n        myAr2(i, 2) = myAr(i - 1, 5)\r\n    Else\r\n        myAr(i, 3) = tmpStrJ\r\n        myAr(i, 5) = tmpStrE\r\n        myAr2(i, 1) = tmpStrJ\r\n        myAr2(i, 2) = tmpStrE\r\n    End If\r\nNext i\r\nSet mySht = Worksheets.Add\r\nWith mySht\r\n    .Range(\"A1\").Value = \"Item_Number\"\r\n    .Range(\"B1\").Value = \"\u4e0a\u4f4d\u98df\u54c1\u540d\uff08\u65e5\uff09\"\r\n    .Range(\"C1\").Value = \"\u4e0a\u4f4d\u98df\u54c1\u540d\uff08\u82f1\uff09\"\r\n    .Range(\"A2:C450\") = myAr2\r\nEnd With\r\nErase ItemNumAr\r\nErase Cancel_Ar\r\nErase GroupAr\r\nErase myAr\r\nErase myAr2\r\nSet mySht = Nothing\r\nSet myRng = Nothing\r\nSet myRegExp1 = Nothing\r\nSet myRegExp2 = Nothing\r\nEnd Sub<\/pre>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>I have released \u2018Standard Tables of Food Composition in Japan 2010\u2032 on Jan. 18, 2012. However, I did not class &hellip; <a href=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=186\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Classify the Item_Number of the &#8216;Standard Tables of Food Composition in Japan 2010&#8217;&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":6026,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6,4],"tags":[],"class_list":["post-186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel","category-nutrition"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186"}],"version-history":[{"count":11,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":6211,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions\/6211"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/media\/6026"}],"wp:attachment":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}