Update the display of the LSI progress output
It now fits more in line with what the other messages display.
This commit is contained in:
parent
1aa49fa734
commit
08b49ec9db
|
@ -24,26 +24,25 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def build_index
|
def build_index
|
||||||
self.class.lsi ||= begin
|
self.class.lsi ||= begin
|
||||||
puts "Starting the classifier..."
|
|
||||||
lsi = Classifier::LSI.new(:auto_rebuild => false)
|
lsi = Classifier::LSI.new(:auto_rebuild => false)
|
||||||
display(" Populating LSI... ")
|
display("\n Populating LSI... ")
|
||||||
|
|
||||||
self.site.posts.each do |x|
|
self.site.posts.each do |x|
|
||||||
display(".")
|
|
||||||
lsi.add_item(x)
|
lsi.add_item(x)
|
||||||
end
|
end
|
||||||
|
|
||||||
display("\n Rebuilding LSI index... ")
|
display("\nRebuilding index... ")
|
||||||
lsi.build_index
|
lsi.build_index
|
||||||
puts ""
|
display("")
|
||||||
lsi
|
lsi
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def lsi_related_posts
|
def lsi_related_posts
|
||||||
lsi.find_related(post.content, 11) - [self.post]
|
self.class.lsi.find_related(post.content, 11) - [self.post]
|
||||||
end
|
end
|
||||||
|
|
||||||
def most_recent_posts
|
def most_recent_posts
|
||||||
|
@ -54,6 +53,5 @@ module Jekyll
|
||||||
$stdout.print(output)
|
$stdout.print(output)
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue