{"id":12331,"date":"2022-09-30T11:50:07","date_gmt":"2022-09-30T06:20:07","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/"},"modified":"2022-09-30T11:50:07","modified_gmt":"2022-09-30T06:20:07","slug":"solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/","title":{"rendered":"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed]"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-36393340\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"36393340\" data-parentid=\"36392373\" data-score=\"0\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>It seems inconceivable that the purpose of your assignment determining the frequency of word-pairs in a file would be to have you wrap a piped-string of shell utilities in a <code>system<\/code> call. What does that possibly teach you about C? That a <code>system<\/code> function exists that allows shell access? Well, it does, and you can, lesson done, nothing learned.<\/p>\n<p>It seems far more likely that the intent was for you to understand the use of <em>structures<\/em> to hold collections of related data in a single object, or at the minimum <em>array<\/em> or <em>pointer indexing<\/em> to check for pairs in adjacent words within a file. Of the 2 normal approaches, use of a struct, or index arithmetic, the use of a struct is far more beneficial. Something simple to hold a pair of words and the frequency that pair is seen is all you need. e.g.:<\/p>\n<pre><code>enum { MAXC = 32, MAXP = 100 };\n\ntypedef struct {\n    char w1[MAXC];\n    char w2[MAXC];\n    size_t freq;\n} wordpair;\n<\/code><\/pre>\n<p>(note, the <code>enum<\/code> simply defines the constants <code>MAXC<\/code> (<code>32<\/code>) and <code>MAXP<\/code> (<code>100<\/code>) for maximum characters per-word, and maximum pairs to record. You could use two <code>#define<\/code> statements to the same end)<\/p>\n<p>You can declare an array of the <code>wordpair<\/code> struct which will hold a pair or words <code>w1<\/code> and <code>w2<\/code> and how many time that pair is seen in <code>freq<\/code>. The array of struct can be treated like any other array, sorted, etc..<\/p>\n<p>To analyze the file, you simply need to read the first two words into the first struct, save a pointer to the second word, and then read each remaining word that remains in the file comparing whether the pair formed by the pointer and the new word read already exists (if so simply update the number of times seen), and if it doesn&#8217;t exist, add a new pair updating the pointer to point to the new word read, and repeat.<\/p>\n<p>Below is a short example that will check the pair occurrence for the words in all filenames given as arguments on the command line (e.g. <code>.\/progname file1 file2 ...<\/code>). If no file is given, the code will read from <code>stdin<\/code> by default.<\/p>\n<pre><code>#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;string.h&gt;\n\nenum { MAXC = 32, MAXP = 100 };\n\ntypedef struct {\n    char w1[MAXC];\n    char w2[MAXC];\n    size_t freq;\n} wordpair;\n\nsize_t get_pair_freq (wordpair *words, FILE *fp);\nint compare (const void *a, const void *b);\n\nint main (int argc, char **argv) {\n\n    \/* initialize variables &amp; open file or stdin for seening *\/\n    wordpair words[MAXP] = {{\"\", \"\", 0}};\n    size_t i, idx = 0;\n    FILE *fp = argc &gt; 1 ? fopen (argv[1], \"r\") : stdin;\n\n    if (!fp) {\n        fprintf (stderr, \"error: file open failed '%s'.\\n\", argv[1]);\n        return 1;\n    }\n\n    \/* read from file given, or from stdin (default) *\/\n    idx = get_pair_freq (words, stdin);\n\n    \/* read each remaining file given on command line *\/\n    for (i = 2; i &lt; (size_t)argc; i++)\n    {   if (fp &amp;&amp; fp != stdin) { fclose (fp); fp = NULL; }\n        \/* open file for reading *\/\n        if (!(fp = fopen (argv[i], \"r\"))) {\n            fprintf (stderr, \"error: file open failed '%s'.\\n\",\n                        argv[i]);\n            continue;\n        }\n\n        \/* check 'idx' against MAXP *\/\n        if ((idx += get_pair_freq (words, fp)) == MAXP)\n            break;\n    }\n    if (fp &amp;&amp; fp != stdin) fclose (fp);\n\n    \/* sort words alphabetically *\/\n    qsort (words, idx, sizeof *words, compare);\n\n    \/* output the frequency of word pairs *\/\n    printf (\"\\nthe occurrence of words pairs are:\\n\\n\");\n    for (i = 0; i &lt; idx; i++) {\n        char pair[MAXC * 2] = \"\";\n        sprintf (pair, \"%s:%s\", words[i].w1, words[i].w2);\n        printf (\"  %-32s : %zu\\n\", pair, words[i].freq);\n    }\n\n    return 0;\n}\n\nsize_t get_pair_freq (wordpair *pairs, FILE *fp)\n{\n    char w1[MAXC] = \"\", w2[MAXC] = \"\";\n    char *fmt1 = \" %32[^ ,.\\t\\n]%*c\";\n    char *fmt2 = \" %32[^ ,.\\t\\n]%*[^A-Za-z0-9]%32[^ ,.\\t\\n]%*c\";\n    char *w1p;\n    int nw = 0;\n    size_t i, idx = 0;\n\n    \/* read 1st 2 words into pair, update index 'idx' *\/\n    if (idx == 0) {\n        if ((nw = fscanf (fp, fmt2, w1, w2)) == 2) {\n            strcpy (pairs[idx].w1, w1);\n            strcpy (pairs[idx].w2, w2);\n            pairs[idx].freq++;\n            w1p = pairs[idx].w2;    \/* save pointer to w2 for next w1 *\/\n            idx++;\n        }\n        else {\n            if (!nw) fprintf (stderr, \"error: file read error.\\n\");\n            return idx;\n        }\n    }\n\n    \/* read each word in file into w2 *\/\n    while (fscanf (fp, fmt1, w2) == 1) {\n        \/* check against all pairs in struct *\/\n        for (i = 0; i &lt; idx; i++) {\n            \/* check if pair already exists  *\/\n            if (strcmp (pairs[i].w1, w1p) == 0 &amp;&amp; \n                strcmp (pairs[i].w2, w2) == 0) {\n                pairs[i].freq++;    \/* update frequency for pair  *\/\n                goto skipdup;       \/* skip adding duplicate pair *\/\n            }\n        } \/* add new pair, update pairs[*idx].freq *\/\n        strcpy (pairs[idx].w1, w1p);\n        strcpy (pairs[idx].w2, w2);\n        pairs[idx].freq++;\n        w1p = pairs[idx].w2;\n        idx++;\n\n    skipdup:\n\n        if (idx == MAXP) { \/* check 'idx' against MAXP *\/\n            fprintf (stderr, \"warning: MAXP words exceeded.\\n\");\n            break;\n        }\n    }\n\n    return idx;\n}\n\n\/* qsort compare funciton *\/\nint compare (const void *a, const void *b)\n{\n    return (strcmp (((wordpair *)a)-&gt;w1, ((wordpair *)b)-&gt;w1));\n}\n<\/code><\/pre>\n<p><strong>Use\/Output<\/strong><\/p>\n<p>Given your example of <code>\"Hi how are you are you.\"<\/code>, it produces the desired results (in sorted order according to your <code>LOCALE<\/code>).<\/p>\n<pre><code>$ echo \"Hi how are you are you.\" | .\/bin\/file_word_pairs\n\nthe occurrence of words pairs are:\n\n  Hi:how                           : 1\n  are:you                          : 2\n  how:are                          : 1\n  you:are                          : 1\n<\/code><\/pre>\n<p>(there is no requirement that you sort the results, but it makes lookup\/confirmation a lot easier with longer files)<\/p>\n<p><strong>Removing qsort<\/strong><\/p>\n<pre><code>$ echo \"Hi how are you are you.\" | .\/bin\/file_word_pairs\n\nthe occurrence of words pairs are:\n\n  Hi:how                           : 1\n  how:are                          : 1\n  are:you                          : 2\n  you:are                          : 1\n<\/code><\/pre>\n<p>While you are free to attempt to use your <code>system<\/code> version, why not take the time to learn how to approach the problem in C. If you want to learn how to do it through a <code>system<\/code> call, take a <code>Linux<\/code> course, as doing it in that manner has very little to do with C.<\/p>\n<p>Look it over, lookup the functions that are new to you in the <em>man pages<\/em> and then ask about anything you don&#8217;t understand thereafter.<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">5<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] It seems inconceivable that the purpose of your assignment determining the frequency of word-pairs in a file would be to have you wrap a piped-string of shell utilities in a system call. What does that possibly teach you about C? That a system function exists that allows shell access? Well, it does, and you &#8230; <a title=\"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed]\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\" aria-label=\"More on [Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed]\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[324,443,3364],"class_list":["post-12331","post","type-post","status-publish","format-standard","hentry","category-solved","tag-c","tag-unix","tag-word-count"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed] - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed] - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] It seems inconceivable that the purpose of your assignment determining the frequency of word-pairs in a file would be to have you wrap a piped-string of shell utilities in a system call. What does that possibly teach you about C? That a system function exists that allows shell access? Well, it does, and you ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-30T06:20:07+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed]\",\"datePublished\":\"2022-09-30T06:20:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\"},\"wordCount\":487,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"c++\",\"unix\",\"word-count\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\",\"name\":\"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed] - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-09-30T06:20:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed] - JassWeb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed] - JassWeb","og_description":"[ad_1] It seems inconceivable that the purpose of your assignment determining the frequency of word-pairs in a file would be to have you wrap a piped-string of shell utilities in a system call. What does that possibly teach you about C? That a system function exists that allows shell access? Well, it does, and you ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/","og_site_name":"JassWeb","article_published_time":"2022-09-30T06:20:07+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed]","datePublished":"2022-09-30T06:20:07+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/"},"wordCount":487,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["c++","unix","word-count"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/","url":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/","name":"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed] - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-09-30T06:20:07+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-for-every-possible-pair-of-two-unique-words-in-the-file-print-out-the-count-of-occurrences-of-that-pair-closed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] For every possible pair of two unique words in the file, print out the count of occurrences of that pair [closed]"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/12331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=12331"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/12331\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=12331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=12331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=12331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}