{
  "id": 324509,
  "title": "Textual Similarity Approach",
  "url": "/competitions/AI4Code/discussion/324509",
  "author_name": "SRK",
  "post_date": "2022-05-12T04:41:10.338000",
  "votes": 50,
  "comment_count": 9,
  "views": 0,
  "content": "<p>Glad to see one more interesting Kaggle competition in the NLP space.</p>\n<p>Very unique competition and was thinking of approaches to solve this one. </p>\n<ul>\n<li>One possible approach is to use the textual similarity between the <code>code</code> and the <code>markdown</code> cells to identify whether they are next to each other or not. </li>\n<li>We can rank-order the pairs based on the similarity score and then select the top <code>markdown</code> cell as the next / previous cell.</li>\n<li>We also need to way to find out whether the <code>markdown</code> cell is the previous or next cell to the give <code>code</code> cell once we find the similarity</li>\n<li>We also need to have a cutoff if we use this approach since some of the <code>code</code> cells may not have <code>markdown</code> cells next to it. </li>\n<li>We may also get consecutive <code>markdown</code> cells and so we need to find a way to deal with this scenario as well.</li>\n</ul>\n<p>Some useful textual similarity competitions from the past that could be helpful are:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/competitions/us-patent-phrase-to-phrase-matching/overview\" target=\"_blank\">U.S. Patent Phrase to Phrase Matching</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/overview\" target=\"_blank\">Quora Question Pairs</a> </li>\n</ul>\n<p>US patent phrase matching is an ongoing competition and so we do not have the top solution for them. Top solutions from the Quora competition are</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34355\" target=\"_blank\">1st place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34310\" target=\"_blank\">2nd place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34288\" target=\"_blank\">3rd place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34349\" target=\"_blank\">4th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34359\" target=\"_blank\">5th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34697\" target=\"_blank\">7th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34371\" target=\"_blank\">8th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34342\" target=\"_blank\">12th place solution</a></li>\n</ul>\n<p>Please share your thoughts. Happy Kaggling!</p>",
  "messages": [
    {
      "id": 1785413,
      "postDate": "2022-05-12T04:41:10.337Z",
      "content": "<p>Glad to see one more interesting Kaggle competition in the NLP space.</p>\n<p>Very unique competition and was thinking of approaches to solve this one. </p>\n<ul>\n<li>One possible approach is to use the textual similarity between the <code>code</code> and the <code>markdown</code> cells to identify whether they are next to each other or not. </li>\n<li>We can rank-order the pairs based on the similarity score and then select the top <code>markdown</code> cell as the next / previous cell.</li>\n<li>We also need to way to find out whether the <code>markdown</code> cell is the previous or next cell to the give <code>code</code> cell once we find the similarity</li>\n<li>We also need to have a cutoff if we use this approach since some of the <code>code</code> cells may not have <code>markdown</code> cells next to it. </li>\n<li>We may also get consecutive <code>markdown</code> cells and so we need to find a way to deal with this scenario as well.</li>\n</ul>\n<p>Some useful textual similarity competitions from the past that could be helpful are:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/competitions/us-patent-phrase-to-phrase-matching/overview\" target=\"_blank\">U.S. Patent Phrase to Phrase Matching</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/overview\" target=\"_blank\">Quora Question Pairs</a> </li>\n</ul>\n<p>US patent phrase matching is an ongoing competition and so we do not have the top solution for them. Top solutions from the Quora competition are</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34355\" target=\"_blank\">1st place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34310\" target=\"_blank\">2nd place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34288\" target=\"_blank\">3rd place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34349\" target=\"_blank\">4th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34359\" target=\"_blank\">5th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34697\" target=\"_blank\">7th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34371\" target=\"_blank\">8th place solution</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/quora-question-pairs/discussion/34342\" target=\"_blank\">12th place solution</a></li>\n</ul>\n<p>Please share your thoughts. Happy Kaggling!</p>",
      "rawMarkdown": "Glad to see one more interesting Kaggle competition in the NLP space.\n\nVery unique competition and was thinking of approaches to solve this one. \n* One possible approach is to use the textual similarity between the `code` and the `markdown` cells to identify whether they are next to each other or not. \n* We can rank-order the pairs based on the similarity score and then select the top `markdown` cell as the next / previous cell.\n* We also need to way to find out whether the `markdown` cell is the previous or next cell to the give `code` cell once we find the similarity\n* We also need to have a cutoff if we use this approach since some of the `code` cells may not have `markdown` cells next to it. \n* We may also get consecutive `markdown` cells and so we need to find a way to deal with this scenario as well.\n\nSome useful textual similarity competitions from the past that could be helpful are:\n* [U.S. Patent Phrase to Phrase Matching](https://www.kaggle.com/competitions/us-patent-phrase-to-phrase-matching/overview)\n* [Quora Question Pairs](https://www.kaggle.com/competitions/quora-question-pairs/overview) \n\nUS patent phrase matching is an ongoing competition and so we do not have the top solution for them. Top solutions from the Quora competition are\n\n* [1st place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34355)\n* [2nd place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34310)\n* [3rd place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34288)\n* [4th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34349)\n* [5th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34359)\n* [7th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34697)\n* [8th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34371)\n* [12th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34342)\n\nPlease share your thoughts. Happy Kaggling!",
      "votes": 48
    },
    {
      "id": 1790151,
      "postDate": "2022-05-14T15:24:47.730Z",
      "content": "<p>Thanks for sharing dude ! Cool this is very helpful for me</p>",
      "rawMarkdown": "Thanks for sharing dude ! Cool this is very helpful for me",
      "votes": 1
    },
    {
      "id": 1789549,
      "postDate": "2022-05-14T02:31:35.310Z",
      "content": "<p>Thanks for sharing, <a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a>; I was looking for ideas, and this will be useful. </p>",
      "rawMarkdown": "Thanks for sharing, @sudalairajkumar; I was looking for ideas, and this will be useful. ",
      "votes": 1
    },
    {
      "id": 1786290,
      "postDate": "2022-05-12T18:43:03.947Z",
      "content": "<p>Thank you for the list !! This is very helpful</p>",
      "rawMarkdown": "Thank you for the list !! This is very helpful",
      "votes": 1
    },
    {
      "id": 1785903,
      "postDate": "2022-05-12T13:34:48.473Z",
      "content": "<p>This is a very interesting and unique competition. I like the idea of using textual similarity to identify whether two cells are next to each other or not. This could be a very helpful approach in solving this problem. I'm also glad to see that there are some previous competitions that could be helpful in this one.Thanks for sharing your thoughts and good luck!</p>",
      "rawMarkdown": "This is a very interesting and unique competition. I like the idea of using textual similarity to identify whether two cells are next to each other or not. This could be a very helpful approach in solving this problem. I'm also glad to see that there are some previous competitions that could be helpful in this one.Thanks for sharing your thoughts and good luck!"
    },
    {
      "id": 1829792,
      "postDate": "2022-06-22T23:44:05.560Z",
      "content": "<p><a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a> Great work! this will definitely go to my bookmarks for future reference</p>",
      "rawMarkdown": "@sudalairajkumar Great work! this will definitely go to my bookmarks for future reference"
    },
    {
      "id": 1798314,
      "postDate": "2022-05-22T21:53:19.617Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 1800854,
          "postDate": "2022-05-25T09:07:20.810Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/karimfadi\" target=\"_blank\">@karimfadi</a> - If we use the language embeddings from BERT etc, it may capture the context similarity. </p>\n<p>Better way is to fine-tune the similarity model on this dataset so that the context information is captured between markdown and code cells. Thank you.</p>",
          "rawMarkdown": "Hi @karimfadi - If we use the language embeddings from BERT etc, it may capture the context similarity. \n\nBetter way is to fine-tune the similarity model on this dataset so that the context information is captured between markdown and code cells. Thank you.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1785547,
      "postDate": "2022-05-12T07:37:55.223Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 1790413,
      "postDate": "2022-05-14T22:15:59.187Z",
      "content": "<p>Thank you, please. <a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a> </p>",
      "rawMarkdown": "Thank you, please. @sudalairajkumar ",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 1790151,
      "author_name": "Baby Shark",
      "author_url": "",
      "post_date": "2022-05-14T15:24:47.730000",
      "content": "<p>Thanks for sharing dude ! Cool this is very helpful for me</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1789549,
      "author_name": "C4rl05/V",
      "author_url": "",
      "post_date": "2022-05-14T02:31:35.310000",
      "content": "<p>Thanks for sharing, <a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a>; I was looking for ideas, and this will be useful. </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1786290,
      "author_name": "Gehan Chopade",
      "author_url": "",
      "post_date": "2022-05-12T18:43:03.947000",
      "content": "<p>Thank you for the list !! This is very helpful</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1785903,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-05-12T13:34:48.473000",
      "content": "<p>This is a very interesting and unique competition. I like the idea of using textual similarity to identify whether two cells are next to each other or not. This could be a very helpful approach in solving this problem. I'm also glad to see that there are some previous competitions that could be helpful in this one.Thanks for sharing your thoughts and good luck!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1829792,
      "author_name": "Apurba Pandey",
      "author_url": "",
      "post_date": "2022-06-22T23:44:05.560000",
      "content": "<p><a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a> Great work! this will definitely go to my bookmarks for future reference</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1798314,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-05-22T21:53:19.617000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1800854,
          "author_name": "SRK",
          "author_url": "",
          "post_date": "2022-05-25T09:07:20.810000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/karimfadi\" target=\"_blank\">@karimfadi</a> - If we use the language embeddings from BERT etc, it may capture the context similarity. </p>\n<p>Better way is to fine-tune the similarity model on this dataset so that the context information is captured between markdown and code cells. Thank you.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1785547,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-05-12T07:37:55.223000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1790413,
      "author_name": "Muhammed Tausif",
      "author_url": "",
      "post_date": "2022-05-14T22:15:59.187000",
      "content": "<p>Thank you, please. <a href=\"https://www.kaggle.com/sudalairajkumar\" target=\"_blank\">@sudalairajkumar</a> </p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1785413": "Glad to see one more interesting Kaggle competition in the NLP space.\n\nVery unique competition and was thinking of approaches to solve this one. \n* One possible approach is to use the textual similarity between the `code` and the `markdown` cells to identify whether they are next to each other or not. \n* We can rank-order the pairs based on the similarity score and then select the top `markdown` cell as the next / previous cell.\n* We also need to way to find out whether the `markdown` cell is the previous or next cell to the give `code` cell once we find the similarity\n* We also need to have a cutoff if we use this approach since some of the `code` cells may not have `markdown` cells next to it. \n* We may also get consecutive `markdown` cells and so we need to find a way to deal with this scenario as well.\n\nSome useful textual similarity competitions from the past that could be helpful are:\n* [U.S. Patent Phrase to Phrase Matching](https://www.kaggle.com/competitions/us-patent-phrase-to-phrase-matching/overview)\n* [Quora Question Pairs](https://www.kaggle.com/competitions/quora-question-pairs/overview) \n\nUS patent phrase matching is an ongoing competition and so we do not have the top solution for them. Top solutions from the Quora competition are\n\n* [1st place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34355)\n* [2nd place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34310)\n* [3rd place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34288)\n* [4th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34349)\n* [5th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34359)\n* [7th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34697)\n* [8th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34371)\n* [12th place solution](https://www.kaggle.com/competitions/quora-question-pairs/discussion/34342)\n\nPlease share your thoughts. Happy Kaggling!",
    "1790151": "Thanks for sharing dude ! Cool this is very helpful for me",
    "1789549": "Thanks for sharing, @sudalairajkumar; I was looking for ideas, and this will be useful. ",
    "1786290": "Thank you for the list !! This is very helpful",
    "1785903": "This is a very interesting and unique competition. I like the idea of using textual similarity to identify whether two cells are next to each other or not. This could be a very helpful approach in solving this problem. I'm also glad to see that there are some previous competitions that could be helpful in this one.Thanks for sharing your thoughts and good luck!",
    "1829792": "@sudalairajkumar Great work! this will definitely go to my bookmarks for future reference",
    "1798314": "",
    "1785547": "",
    "1790413": "Thank you, please. @sudalairajkumar "
  }
}