# netlabeler

Published articles for netlabeler.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Machine Learning Datasets for NLP

DevFeed: [Machine Learning Datasets for NLP](<https://devfeed.tech/articles/machine-learning-datasets-for-nlp-28202.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/netlabeler/2020/03/09/machine-learning-datasets-for-nlp.html>)

Author: Fuzzygroup

Published: 2020-03-09T00:00:00Z

Content type: article

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [datasets](<https://devfeed.tech/topics/datasets.md>), [Natural language processing](<https://devfeed.tech/topics/nlp.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [data](<https://devfeed.tech/topics/data.md>), [Kaggle](<https://devfeed.tech/topics/kaggle.md>)

Tags: [data](<https://devfeed.tech/tags/data.md>), [datasets](<https://devfeed.tech/tags/datasets.md>), [kaggle](<https://devfeed.tech/tags/kaggle.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [netlabeler](<https://devfeed.tech/tags/netlabeler.md>), [nlp](<https://devfeed.tech/tags/nlp.md>)

### AI overview

A short list of machine-learning datasets for natural language processing, including resources from Kaggle, LionBridge.ai, the Million Song Dataset, Synced Review, Twitter, and Sample Stream.

### Source excerpt

Today is a short one, just pointers to some datasets for Machine Learning data sets that I keep losing. Kaggle LionBridge.ai Million Song Dataset Synced Review Twitter Sample Stream

## When to Use a Helper Method in Rails

DevFeed: [When to Use a Helper Method in Rails](<https://devfeed.tech/articles/when-to-use-a-helper-method-in-rails-28265.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/rails/2020/03/04/when-to-use-a-helper-method-in-rails.html>)

Author: Fuzzygroup

Published: 2020-03-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Code](<https://devfeed.tech/topics/code.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [function](<https://devfeed.tech/tags/function.md>), [html](<https://devfeed.tech/tags/html.md>), [netlabeler](<https://devfeed.tech/tags/netlabeler.md>), [rails](<https://devfeed.tech/tags/rails.md>), [rake](<https://devfeed.tech/tags/rake.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [view](<https://devfeed.tech/tags/view.md>)

### AI overview

This Rails tutorial explains when to use a helper method to transform stored hash data into HTML for display. It presents a testable display_labeled_data helper that builds paragraph output, converts newlines to HTML breaks, joins the result, and marks it html_safe. It also notes that Rails helpers share a global namespace.

### Source excerpt

One of the more interesting facilities in Rails helpers which reside in app/helpers/*.rb and are used, well, as helpers. Helpers are basically display level execution of Ruby code. I recently wrote what I thought was a great example of a helper so I thought I'd document it. What I had was a object, stored in the database which had a bunch of data that I needed to display: the object, called a label A serialized hash called labeled_data label0 label1 label2 label3 label4 label5 label6 label7 label8 label9 What I wanted to do was transform this, at display time, to an HTML structure like this: <p>label0: <b>The Data for Label 0</b> <p>label1: <b>The Data for Label 0</b> and, correctly, not show label2, etc if they were blank. And, naturally, do the right thing when there was no data in the labeled_data hash, etc. And while I could have done this with a view and code wrapped in evaluation / output tags: <% and %> or <%= or %> it is dramatically cleaner to write this type of thing as a helper and then call it as a function like display_labeled_data(label). Not only does this make the code much cleaner than evaluation / output tags, it also has the advantage of being testable. Now all that said, here is the code: def display_labeled_data(label) return if label.labeled_data.nil? return if label.labeled_data.keys.nil? output = [] label.labeled_data.keys.each do |key| output << "<p>" output << key output << ":" tmp = label.extracted_data[key] if tmp tmp = tmp.gsub(/\n/,'
') end output << tmp output << "</p>" end output.join("\n").html_safe end The key idea here is: create an output object, in this case an array or [] loop a data structure - label.labeled_data.keys as you loop the data structure, put things into the output object like a paragraph tag, the name of the key i.e. "label0", a ':' clean up the data by converting new lines to html line breaks add the data into the output element add a closing p tag add a line break onto every element of the output object (using