Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🎸 AnalyzeSyntax γƒ¬γ‚³γƒΌγƒ‰γ‚’η”Ÿζˆγ™γ‚‹γ‚Ώγ‚Ήγ‚―γ‚’δ½œζˆγ—γŸ #130

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/tasks/save_analyze_syntaxes.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace :save_analyze_syntaxes do
desc 'ε…¨γƒ„γ‚€γƒΌγƒˆγ‚’ NaturalLanguage::Analyzer γ§θ§£ζžγ—γ¦δΏε­˜γ™γ‚‹'
task tweets: :environment do
client = CloudLanguage.client

ActiveRecord::Base.transaction do
Tweet.all.each do |tweet|
NaturalLanguage::Analyzer.save_analyze_syntax_record(client, tweet)
end
end
end

desc 'ε…¨DMγ‚’ NaturalLanguage::Analyzer γ§θ§£ζžγ—γ¦δΏε­˜γ™γ‚‹'
task direct_messages: :environment do
client = CloudLanguage.client

ActiveRecord::Base.transaction do
DirectMessage.all.each do |direct_message|
NaturalLanguage::Analyzer.save_analyze_syntax_record(client, direct_message)
end
end
end
end