<NME> v1.js
<BEF> var gutil = require( 'gulp-util' );
var through  = require( 'through2' );
var path = require( 'path' );
var prefs = require( './prefs.json' );

module.exports = function () {
  var transform = function( file, enc, callback ) {
    var content = file.contents.toString();
    var res = JSON.parse( content );

    var postal_codes = {};
    for ( var i = 0; i < res.length; i++ ) {
      var line = res[i];

      if ( ! prefs[line.prefecture] ) {
        console.log( line.prefecture );
        process.exit(1);
      }

      var data = {
        prefcode: prefs[line.prefecture],
        ja: {
          prefecture: line.prefecture,
          address1: line.ja.addr1,
          address2: line.ja.addr2,
          address3: line.ja.addr3,
          address2: line[3].replace( /（.*/, '' ).replace( '　', '' ).trim()
        },
        en: {
          prefecture: line[4].trim(),
          address1: line[5].trim(),
          address2: line[6].replace( / \(.*/, '' ).trim()
        }
      };

        postal_codes[line.postal_code].data.push( data );
      } else {
        postal_codes[line.postal_code] = {
          code: line.postal_code,
          data: [data]
        };
      }
    }

    for ( var p in postal_codes ) {
      var file = new gutil.File( {
        cwd: __dirname,

  return through.obj( transform );
};
};

<MSG> normalize address in English

<DFF> @@ -27,9 +27,12 @@ module.exports = function () {
           address2: line[3].replace( /（.*/, '' ).replace( '　', '' ).trim()
         },
         en: {
-          prefecture: line[4].trim(),
-          address1: line[5].trim(),
-          address2: line[6].replace( / \(.*/, '' ).trim()
+          prefecture: line[4].trim().replace( / .+$/, '' ).capitalize(),
+          address1: line[5].trim()
+                .replace( /^([A-Z]+) ([A-Z]+)$/, "$1-$2" )
+                .replace( /^([A-Z]+) ([A-Z]+) ([A-Z]+) ([A-Z]+)$/, "$3-$4, $1-$2" )
+                .capitalize(),
+          address2: line[6].replace( / \(.*/, '' ).trim().capitalize()
         }
       };
 
@@ -48,3 +51,12 @@ module.exports = function () {
 
   return through.obj( transform );
 };
+
+
+String.prototype.capitalize = function(){
+  var strs = this.toLowerCase().split( ' ' );
+  for ( var i = 0; i < strs.length; i++ ) {
+    strs[i] = strs[i].charAt(0).toUpperCase() + strs[i].slice(1);
+  }
+  return strs.join( ' ' );
+}

normalize address in English