Download
Magazine
Develop
Account
Download
Magazine
Develop
Login
Forgot Account/Password
Create Account
Language
Help
Language
Help
×
Login
Login Name
Password
×
Forgot Account/Password
Category:
Software
People
PersonalForge
Magazine
Wiki
Search
OSDN
>
Find Software
>
Communications
>
Email
>
Filters
>
bsfilter
>
Forums
>
users
>
mecab-0.90 対応
bsfilter
Description
Project Summary
Developer Dashboard
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
History
Downloads
List of Releases
Stats
Source Code
Code Repository list
CVS
View Repository
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
FrontPage
Title index
Recent changes
Communication
List of Forums
users (627)
Forums:
users
(Thread #9866)
Return to Thread list
RSS
mecab-0.90 対応 (2006-01-12 09:54 by
(del#17342)
#19021)
Reply
Create ticket
mecab-0.90 からバインディングのインターフェースが変更になりました。とりあえず以下の修正で動作するようです。
mecab-0.81 以前と互換を保つのが難しいと思いますが、ご検討願います。
--- bsfilter/bsfilter Mon Nov 14 23:52:36 2005
+++ /usr/local/bin/bsfilter Thu Jan 12 09:42:45 2006
@@ -1022,7 +1022,7 @@
@method = Proc::new {|s| block(s)}
when "mecab"
@method = Proc::new {|s| mecab(s)}
- @m = MeCab::Tagger.new([$0, "-Ochasen"])
+ @m = MeCab::Tagger.new("-Ochasen")
when "chasen"
Chasen.getopt("-F", '%H %m\n', "-j")
@method = Proc::new {|s| chasen(s)}
@@ -1064,7 +1064,7 @@
end
array = Array::new
node = @m.parseToNode(str)
- while (node.hasNode == 1)
+ while (node.stat == 1)
token = node.getSurface
hinshi = node.getFeature.split(/,/)[0]
## print token, hinshi, "\n"
Reply to #19021
×
Subject
Body
Reply To Message #19021 > mecab-0.90 からバインディングのインターフェースが変更になりました。とりあえず以下の修正で動作するようです。 > > mecab-0.81 以前と互換を保つのが難しいと思いますが、ご検討願います。 > > --- bsfilter/bsfilter Mon Nov 14 23:52:36 2005 > +++ /usr/local/bin/bsfilter Thu Jan 12 09:42:45 2006 > @@ -1022,7 +1022,7 @@ > @method = Proc::new {|s| block(s)} > when "mecab" > @method = Proc::new {|s| mecab(s)} > - @m = MeCab::Tagger.new([$0, "-Ochasen"]) > + @m = MeCab::Tagger.new("-Ochasen") > when "chasen" > Chasen.getopt("-F", '%H %m\n', "-j") > @method = Proc::new {|s| chasen(s)} > @@ -1064,7 +1064,7 @@ > end > array = Array::new > node = @m.parseToNode(str) > - while (node.hasNode == 1) > + while (node.stat == 1) > token = node.getSurface > hinshi = node.getFeature.split(/,/)[0] > ## print token, hinshi, "\n"
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: mecab-0.90 対応 (2006-01-14 15:23 by
nabeken
#19090)
Reply
Create ticket
ありがとうございます。
http://lists.sourceforge.jp/mailman/archives/mecab-devel/2006-January/000010.html
mecabのバージョンを知ることは可能になりそうなので、対応を検討します。
Reply to
#19021
Reply to #19090
×
Subject
Body
Reply To Message #19090 > ありがとうございます。 > http://lists.sourceforge.jp/mailman/archives/mecab-devel/2006-January/000010.html > mecabのバージョンを知ることは可能になりそうなので、対応を検討します。
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel