This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- encoding: utf-8 -*- | |
require 'rexml/document' | |
require 'cgi' | |
require 'time' | |
DT_TEMPLATE=<<EOS | |
<DT><A HREF="%s" ADD_DATE="%d" PRIVATE="0" TAGS="%s">%s</A> | |
EOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns lucene_gosen_test.core (:gen-class)) | |
(import java.util.Collections) | |
(defn -main [& args] | |
(println (first args)) | |
(with-open [reader (new java.io.StringReader (first args))] | |
(let [ | |
analyzer (new org.apache.lucene.analysis.ja.JapaneseAnalyzer org.apache.lucene.util.Version/LUCENE_35 Collections/EMPTY_SET Collections/EMPTY_SET Collections/EMPTY_SET "/home/haruyama/work/solr/dic/solr/conf/dic") | |
ts (.tokenStream analyzer "dummy" reader) | |
termAtt (.getAttribute ts org.apache.lucene.analysis.tokenattributes.CharTermAttribute) | |
posAtt (.getAttribute ts org.apache.lucene.analysis.ja.tokenAttributes.PartOfSpeechAttribute) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.Reader; | |
import java.io.StringReader; | |
import org.apache.lucene.analysis.ja.JapaneseTokenizer; | |
public class LuceneGosenKuyoBug { | |
public static void main(String[] args) { | |
String s = ""; | |
int count = Integer.parseInt(args[1]); | |
for (int i = 0; i < count; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- encoding: utf-8 -*- | |
require 'digest/md5' | |
prefix = | |
begin | |
ARGV[0].downcase | |
rescue | |
'90840d' | |
end |
NewerOlder