Chasen version 2.4.4 - How to Download and Install on Mac OS X
Tuesday the 3rd of November, 2009

    version 2.4.4

      View the most recent changes for the chasen port at: chasen.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for chasen.
      The raw portfile for chasen 2.4.4 is located here:
      http://chasen.darwinports.com/dports/textproc/chasen/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/chasen


      The chasen Portfile 57375 2009-09-10 08:16:41Z ryandesign macports.org $

      PortSystem 1.0

      Name: chasen
      Version: 2.4.4
      set ipa ipadic-2.7.0
      Category: textproc japanese
      Maintainers: takanori openmaintainer
      Description: Japanese morphological analysis system
      Long Description: ChaSen is a tool to analyze a text according to a set of dictionaries that specifies grammer, part of speech of words, and so on. Because ChaSen itself has no dictionaries, we need explicit dictionaries to use. IPADIC is such a set of dictionaries that specifies Japanese language. This version of chasen treats encoding of input as EUC-JP, and its output is encoded as EUC-JP by default.
      Platform: darwin
      Homepage: http://chasen-legacy.sourceforge.jp/
      #master_sites sourceforge_jp:chasen-legacy/32224/:chasen # sourceforge_jp:ipadic/24435/:ipadic
      set sfjpid_chasen 32224
      set sfjpid_ipadic 24435
      Master Sites: http://keihanna.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen http://osdn.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen http://keihanna.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic http://osdn.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic http://chasen.naist.jp/stable/ipadic/:ipadic
      distfiles ${distname}.tar.gz:chasen
      Patch Files: patch-configure.diff
      Checksums: ${name}-${version}.tar.gz md5 42b20d41a33e1f5e7a05cc56aaa548b0 sha1 3328e6667d6b74955b6c4b1b49a7d97805e4de8c rmd160 ceb4a7c064ba5bf0d356d6db0e64b644b88dbc54 ${ipa}.tar.gz md5 f36d315cae25b086a889b7090c674977 sha1 52784d8abb3361eafec83ab543be63cf087f9eb2 rmd160 5e37c750801df63439032be4954c4b63a44012cb

      depends_lib port:darts port:libiconv
      depends_build port:nkf

      default_variants +ipadic

      post-extract {
      foreach f {tests/test-chasen.sh tests/test-dic.sh} {
      file attributes ${worksrcpath}/${f} -permissions 0755
      }
      }

      configure.args --libexecdir=${prefix}/lib --with-darts=${prefix}/include --with-libiconv=${prefix}

      use_parallel_build yes

      test.run yes
      test.target check

      post-destroot {
      xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/doc

      xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL NEWS README ${destroot}${prefix}/share/doc/${name}
      xinstall -m 644 ${worksrcpath}/doc/manual-j.pdf ${destroot}${prefix}/share/doc/${name}/doc
      }

      Variant: ipadic description {Install ipadic} {
      # Japanese dictionaries for ChaSen
      distfiles-append ${ipa}.tar.gz:ipadic
      post-destroot {
      foreach {enc c} {UTF-8 w EUC-JP e Shift_JIS s} {
      file mkdir ${workpath}/${ipa}-${enc}
      system "(cd ${workpath}/${ipa}; tar cf - .) | (cd ${workpath}/${ipa}-${enc}; tar xf -)"
      reinplace "s|PACKAGE=ipadic|PACKAGE=ipadic-${enc}|" ${workpath}/${ipa}-${enc}/configure
      reinplace "s|/makemat|/makemat -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
      reinplace "s|/makeda|/makeda -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
      foreach f [glob ${workpath}/${ipa}-${enc}/*.cha ${workpath}/${ipa}-${enc}/*.dic ${workpath}/${ipa}-${enc}/chasenrc.in] {
      system "mv ${f} ${f}_ && ${prefix}/bin/nkf --ic=EUC-JP --oc=${enc} ${f}_ > ${f}"
      }
      system "cd ${workpath}/${ipa}-${enc} && ./configure --with-dicdir=${prefix}/lib/chasen/dic --with-mkchadic=${destroot}${prefix}/lib/chasen --with-chasenrc-path=${destroot}${prefix}/etc/chasenrc-${enc} && DYLD_LIBRARY_PATH=${destroot}${prefix}/lib make && make install DESTDIR=${destroot}"
      }
      ln -s chasenrc-EUC-JP ${destroot}${prefix}/etc/chasenrc

      xinstall -m 755 -d ${destroot}${prefix}/share/doc/chasen-ipadic/doc

      xinstall -m 644 -W ${workpath}/${ipa} AUTHORS COPYING ChangeLog INSTALL INSTALL-ja NEWS README ${destroot}${prefix}/share/doc/chasen-ipadic
      xinstall -m 644 ${workpath}/${ipa}/doc/ipadic-ja.pdf ${destroot}${prefix}/share/doc/chasen-ipadic/doc
      }

      post-activate {
      ui_msg "\nDue to historical reasons, the default encoding of ChaSen is set to EUC-JP."
      ui_msg "If you'd like to handle text files written in UTF-8 or Shift_JIS, you may use -r and -i options.\n"
      ui_msg " UTF-8) chasen -r ${prefix}/etc/chasenrc-UTF-8 -i w "
      ui_msg " Shift_JIS) chasen -r ${prefix}/etc/chasenrc-Shift_JIS -i s \n"
      }
      }

      livecheck.type regex
      livecheck.url http://sourceforge.jp/projects/chasen-legacy/releases/rss
      livecheck.regex ${name}.* - ${name}-(\[0-9.a-z\-\]+)

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/chasen
      % sudo port install chasen
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching chasen
      ---> Verifying checksum for chasen
      ---> Extracting chasen
      ---> Configuring chasen
      ---> Building chasen with target all
      ---> Staging chasen into destroot
      ---> Installing chasen
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using chasen with these commands:
      %  man chasen
      % apropos chasen
      % which chasen
      % locate chasen

     Where to find more information:

    Darwin Ports



    Lightbox this page.