{
  "id": 330384,
  "title": "A tiny hint for preprocessing",
  "url": "/competitions/AI4Code/discussion/330384",
  "author_name": "Chenglu",
  "post_date": "2022-06-12T03:15:29.750000",
  "votes": 29,
  "comment_count": 0,
  "views": 0,
  "content": "<blockquote>\n  <p>If you are using the preprocessing method from the cool pairwise <a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/326473\" target=\"_blank\">notebooks</a> shared by <a href=\"https://www.kaggle.com/yuanzhezhou\" target=\"_blank\">@yuanzhezhou</a> , you may face this issue.</p>\n</blockquote>\n<p>For markdown preprocessing, we may have to be careful with some chars, since these chars may conatain \"ordering information\". For example, given the following tipical well-organized notebbook:</p>\n<pre><code># Headline1\n\n&lt;code_cells&gt;\n\n## Headline2\n\n&lt;code_cells&gt;\n\n1. xxxxx\n&lt;code cells&gt;\n\n2. xxxxx\n&lt;code_cells&gt;\n\n3. xxxxx\n&lt;code_cells&gt;\n\n### Headline3\n\na. xxxxx\n&lt;code_cells&gt;\n\nb. xxxxx\n&lt;code_cells&gt;\n\nc. xxxxx\n&lt;code_cells&gt;\n</code></pre>\n<p>If using the <code>preprocess_text</code> from the notebooks, the output will be:</p>\n<pre><code>headline1 code_cells headline2 code_cells xxxxx code cell xxxxx code_cells xxxxx code_cells headline3 xxxxx code_cells xxxxx code_cells xxxxx code_cells\n</code></pre>\n<p>all the \"ordering information\" is gone. When processing markdown we may want to keep some chars that have the ordering information, such as:</p>\n<p>for headlines:</p>\n<pre><code>#, ##, ###...\n</code></pre>\n<p>for ordered list:</p>\n<pre><code>1. 2. 3.\na. b. c.\n</code></pre>\n<p>for non ordered list, not ordered, but also will benefit the result for grouping.</p>\n<pre><code>*, -\n</code></pre>\n<p>if you have more of this, please comment.</p>",
  "messages": [
    {
      "id": 1817911,
      "postDate": "2022-06-12T03:15:29.750Z",
      "content": "<blockquote>\n  <p>If you are using the preprocessing method from the cool pairwise <a href=\"https://www.kaggle.com/competitions/AI4Code/discussion/326473\" target=\"_blank\">notebooks</a> shared by <a href=\"https://www.kaggle.com/yuanzhezhou\" target=\"_blank\">@yuanzhezhou</a> , you may face this issue.</p>\n</blockquote>\n<p>For markdown preprocessing, we may have to be careful with some chars, since these chars may conatain \"ordering information\". For example, given the following tipical well-organized notebbook:</p>\n<pre><code># Headline1\n\n&lt;code_cells&gt;\n\n## Headline2\n\n&lt;code_cells&gt;\n\n1. xxxxx\n&lt;code cells&gt;\n\n2. xxxxx\n&lt;code_cells&gt;\n\n3. xxxxx\n&lt;code_cells&gt;\n\n### Headline3\n\na. xxxxx\n&lt;code_cells&gt;\n\nb. xxxxx\n&lt;code_cells&gt;\n\nc. xxxxx\n&lt;code_cells&gt;\n</code></pre>\n<p>If using the <code>preprocess_text</code> from the notebooks, the output will be:</p>\n<pre><code>headline1 code_cells headline2 code_cells xxxxx code cell xxxxx code_cells xxxxx code_cells headline3 xxxxx code_cells xxxxx code_cells xxxxx code_cells\n</code></pre>\n<p>all the \"ordering information\" is gone. When processing markdown we may want to keep some chars that have the ordering information, such as:</p>\n<p>for headlines:</p>\n<pre><code>#, ##, ###...\n</code></pre>\n<p>for ordered list:</p>\n<pre><code>1. 2. 3.\na. b. c.\n</code></pre>\n<p>for non ordered list, not ordered, but also will benefit the result for grouping.</p>\n<pre><code>*, -\n</code></pre>\n<p>if you have more of this, please comment.</p>",
      "rawMarkdown": "> If you are using the preprocessing method from the cool pairwise [notebooks](https://www.kaggle.com/competitions/AI4Code/discussion/326473) shared by @yuanzhezhou , you may face this issue.\n\nFor markdown preprocessing, we may have to be careful with some chars, since these chars may conatain \"ordering information\". For example, given the following tipical well-organized notebbook:\n\n```markdown\n# Headline1\n\n<code_cells>\n\n## Headline2\n\n<code_cells>\n\n1. xxxxx\n<code cells>\n\n2. xxxxx\n<code_cells>\n\n3. xxxxx\n<code_cells>\n\n### Headline3\n\na. xxxxx\n<code_cells>\n\nb. xxxxx\n<code_cells>\n\nc. xxxxx\n<code_cells>\n\n```\n\nIf using the `preprocess_text` from the notebooks, the output will be:\n\n```\nheadline1 code_cells headline2 code_cells xxxxx code cell xxxxx code_cells xxxxx code_cells headline3 xxxxx code_cells xxxxx code_cells xxxxx code_cells\n```\n\nall the \"ordering information\" is gone. When processing markdown we may want to keep some chars that have the ordering information, such as:\n\nfor headlines:\n```\n#, ##, ###...\n```\n\nfor ordered list:\n\n```\n1. 2. 3.\na. b. c.\n```\n\nfor non ordered list, not ordered, but also will benefit the result for grouping.\n\n```\n*, -\n```\n\nif you have more of this, please comment.\n",
      "votes": 28
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1817911": "> If you are using the preprocessing method from the cool pairwise [notebooks](https://www.kaggle.com/competitions/AI4Code/discussion/326473) shared by @yuanzhezhou , you may face this issue.\n\nFor markdown preprocessing, we may have to be careful with some chars, since these chars may conatain \"ordering information\". For example, given the following tipical well-organized notebbook:\n\n```markdown\n# Headline1\n\n<code_cells>\n\n## Headline2\n\n<code_cells>\n\n1. xxxxx\n<code cells>\n\n2. xxxxx\n<code_cells>\n\n3. xxxxx\n<code_cells>\n\n### Headline3\n\na. xxxxx\n<code_cells>\n\nb. xxxxx\n<code_cells>\n\nc. xxxxx\n<code_cells>\n\n```\n\nIf using the `preprocess_text` from the notebooks, the output will be:\n\n```\nheadline1 code_cells headline2 code_cells xxxxx code cell xxxxx code_cells xxxxx code_cells headline3 xxxxx code_cells xxxxx code_cells xxxxx code_cells\n```\n\nall the \"ordering information\" is gone. When processing markdown we may want to keep some chars that have the ordering information, such as:\n\nfor headlines:\n```\n#, ##, ###...\n```\n\nfor ordered list:\n\n```\n1. 2. 3.\na. b. c.\n```\n\nfor non ordered list, not ordered, but also will benefit the result for grouping.\n\n```\n*, -\n```\n\nif you have more of this, please comment.\n"
  }
}