<commit_before>import DocumentNode from './DocumentNode'

/**
  A base class for all text-ish nodes, such as Paragraphs, Headings,
  Prerendered, etc.
*/
class TextNode extends DocumentNode {

  getTextPath() {
    // TODO: deprecate this
    // console.warn('DEPRECATED: use node.getPath()')
    return this.getPath()
  }

  getPath() {
    return [this.id, 'content']
  }

  getText() {
    return this.content
  }

  isEmpty() {
    return !this.content
  }

  getLength() {
    return this.content.length
  }

}

TextNode.isText = true

TextNode.schema = {
  type: "text",
  content: "text",
  direction: { type: "string", optional: true },
  textAlign: { type: "string", optional: true }
}

export default TextNode<commit_msg>Use textAlign left by default.<commit_after>import DocumentNode from './DocumentNode'

/**
  A base class for all text-ish nodes, such as Paragraphs, Headings,
  Prerendered, etc.
*/
class TextNode extends DocumentNode {

  getTextPath() {
    // TODO: deprecate this
    // console.warn('DEPRECATED: use node.getPath()')
    return this.getPath()
  }

  getPath() {
    return [this.id, 'content']
  }

  getText() {
    return this.content
  }

  isEmpty() {
    return !this.content
  }

  getLength() {
    return this.content.length
  }

}

TextNode.isText = true

TextNode.schema = {
  type: "text",
  content: "text",
  direction: { type: "string", optional: true },
  textAlign: { type: "string", default: 'left' }
}

export default TextNode
{'fraction_non_alphanumeric': 0.1358108108108108, 'fraction_numerical': 0.0, 'mean_word_length': 3.136871508379888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3051617', 'n_tokens_mistral': 506, 'n_tokens_neox': 483, 'n_words': 129}