<commit_before><!--
Exposes the text of its own content as an attribute which can be bound to.

Elements often need to convert the content of distributed nodes into a value
which can be passed to an *attribute* on another element via binding. This
element makes that possible in a declarative fashion. For example, suppose an
element wants to pass its own distributed content to a sub-element called
interesting-element:

<polymer-element name="sample-element" noscript>
<template>
  <basic-text-extractor value="{{foo}}">
    <content></content>
  </basic-text-extractor>
  <interesting-element value="{{foo}}"></interesting-element>
</template>
</polymer-element>

This element effectively lets one bind to the text of a content element. If the
distributed content itself contains content elements, these will be recursively
traversed in document order.

@element basic-text-extractor
-->

<link rel="import" href="../basic-element/basic-element.html">

<polymer-element name="basic-text-extractor" attributes="value" extends="basic-element">

<template>
  <style>
  /* Hide this element unless the .show class is applied. */
  :host(:not(.show)) {
    display: none;
  }
  </style>
  <content id="content"></content>
</template>

<script>
Polymer( "basic-text-extractor", {
<commit_msg>Upgrade to more concise Polymer 0.4 constructor.<commit_after><!--
Exposes the text of its own content as an attribute which can be bound to.

Elements often need to convert the content of distributed nodes into a value
which can be passed to an *attribute* on another element via binding. This
element makes that possible in a declarative fashion. For example, suppose an
element wants to pass its own distributed content to a sub-element called
interesting-element:

<polymer-element name="sample-element" noscript>
<template>
  <basic-text-extractor value="{{foo}}">
    <content></content>
  </basic-text-extractor>
  <interesting-element value="{{foo}}"></interesting-element>
</template>
</polymer-element>

This element effectively lets one bind to the text of a content element. If the
distributed content itself contains content elements, these will be recursively
traversed in document order.

@element basic-text-extractor
-->

<link rel="import" href="../basic-element/basic-element.html">

<polymer-element name="basic-text-extractor" attributes="value" extends="basic-element">

<template>
  <style>
  /* Hide this element unless the .show class is applied. */
  :host(:not(.show)) {
    display: none;
  }
  </style>
  <content id="content"></content>
</template>

<script>
Polymer({

{'fraction_non_alphanumeric': 0.11476043276661514, 'fraction_numerical': 0.0007727975270479134, 'mean_word_length': 4.6652078774617065, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2817916', 'n_tokens_mistral': 718, 'n_tokens_neox': 694, 'n_words': 281}