{"id":6661,"date":"2018-06-15T13:33:28","date_gmt":"2018-06-15T10:33:28","guid":{"rendered":"https:\/\/ssrlab.by\/?p=6661"},"modified":"2020-12-15T12:50:45","modified_gmt":"2020-12-15T09:50:45","slug":"padlik-chastotnastsi-n-gram","status":"publish","type":"post","link":"https:\/\/ssrlab.by\/en\/6661","title":{"rendered":"N-gram Frequency Counter"},"content":{"rendered":"<p>Tools <a href=\"https:\/\/corpus.by\/NgramFrequencyCounter\/?lang=en\"><strong>&#8220;N-gram Frequency Counter&#8221;<\/strong><\/a> for counting the frequency of n number of elements frequency. Symbols and tokens can act as elements, as well as words and even regular expressions. Arbitrary characters is an input for the service. The result of the service is a list of n-grams with their frequencies in the input text.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Access to the service via the API<\/strong><\/p>\n<p>To access the service\u00a0<strong><a href=\"https:\/\/corpus.by\/NgramFrequencyCounter\/?lang=en\">\u00abN-gram Frequency Counter\u00bb<\/a><\/strong> via the API, you should send an AJAX-request (type: POST) to the address https:\/\/corpus.by\/NgramFrequencyCounter\/api.php. With an input array\u00a0<em><strong>data\u00a0<\/strong><\/em>the following parameters are passed:<\/p>\n<ul>\n<li><strong><em>localization<\/em><\/strong> \u2014 resulting data localization language.<\/li>\n<li><strong><em>text<\/em><\/strong> \u2014 arbitrary set of characters.<\/li>\n<li><em><strong>gramSelector\u00a0<\/strong><\/em>\u2014 the type of \u00abgram\u00bb \u2013 the type of elements in a sequence to be processsed. Available types: <strong><em>character<\/em><\/strong>, <em><strong>word<\/strong><\/em>.<\/li>\n<li><em><strong>n<\/strong><\/em> \u2014 the number of \u00abgram\u00bb in one n-gram.<\/li>\n<li><strong><em>caseSensitive<\/em> <\/strong>\u2014 marker for case sensitive characters counting.<\/li>\n<li><strong><em>delimiterSensitive<\/em> <\/strong>\u2014 marker for taking into account dilimiters (spaces, punctuation) while counting.<\/li>\n<\/ul>\n<p>Example of AJAX-request:<\/p>\n<blockquote><p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">$.ajax({<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0type: &#8220;POST&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0url: &#8220;https:\/\/corpus.by\/NgramFrequencyCounter\/api.php&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0data:{<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;localization&#8221;: &#8220;en&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;text&#8221;: &#8220;\u0413\u0440\u0443\u0448\u0430 \u0446\u0432\u0456\u043b\u0430 \u0430\u043f\u043e\u0448\u043d\u0456 \u0433\u043e\u0434.<br \/>\n\u0423\u0441\u0435 \u0433\u0430\u043b\u0456\u043d\u044b \u044f\u0435, \u0443\u0441\u0435 \u0432\u044f\u043b\u0456\u043a\u0456\u044f \u0440\u0430\u0441\u043e\u0445\u0456, \u0434\u0430 \u0430\u043f\u043e\u0448\u043d\u044f\u0433\u0430 \u043f\u0440\u0443\u0446\u0456\u043a\u0430, \u0431\u044b\u043b\u0456 \u045e\u0441\u044b\u043f\u0430\u043d\u044b \u0431\u0443\u0439\u043d\u044b\u043c \u0431\u0435\u043b\u0430-\u0440\u0443\u0436\u043e\u0432\u044b\u043c \u0446\u0432\u0435\u0442\u0430\u043c. \u042f\u043d\u0430 \u043a\u0456\u043f\u0435\u043b\u0430, \u043c\u043b\u0435\u043b\u0430 \u0456 \u0440\u0430\u0441\u043a\u0430\u0448\u0430\u0432\u0430\u043b\u0430\u0441\u044f \u045e \u043f\u0447\u0430\u043b\u0456\u043d\u044b\u043c \u0437\u0432\u043e\u043d\u0435, \u0446\u044f\u0433\u043d\u0443\u043b\u0430 \u0434\u0430 \u0441\u043e\u043d\u0446\u0430 \u0441\u0442\u0430\u043b\u044b\u044f \u043b\u0430\u043f\u044b \u0456 \u0440\u0430\u0441\u043f\u0443\u0441\u043a\u0430\u043b\u0430 \u045e \u044f\u0433\u043e \u0437\u0437\u044f\u043d\u043d\u0456 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0456\u044f, \u043a\u0432\u043e\u043b\u044b\u044f \u043f\u0430\u043b\u044c\u0446\u044b \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u0441\u0442\u043a\u0430\u045e. \u0406 \u0431\u044b\u043b\u0430 \u044f\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u043c\u0430\u0433\u0443\u0442\u043d\u0430\u044f \u0456 \u0441\u0432\u0435\u0436\u0430\u044f, \u0442\u0430\u043a \u0443\u0442\u0440\u0430\u043f\u0451\u043d\u0430 \u0441\u043f\u0440\u0430\u0447\u0430\u043b\u0456\u0441\u044f \u045e \u044f\u0435 \u0440\u0443\u0436\u043e\u0432\u044b\u043c \u0440\u0430\u0456 \u043f\u0447\u043e\u043b\u044b, \u0448\u0442\u043e, \u0437\u0434\u0430\u0432\u0430\u043b\u0430\u0441\u044f, \u043d\u0435 \u0431\u0443\u0434\u0437\u0435 \u0451\u0439 \u0437\u0432\u043e\u0434\u0443 \u0456 \u043d\u0435 \u0431\u0443\u0434\u0437\u0435 \u0451\u0439 \u043a\u0430\u043d\u0446\u0430.&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;<em>gramSelector<\/em>&#8220;: &#8220;<em>character<\/em>&#8220;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;<em>n<\/em>&#8220;: &#8220;3&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;<em>caseSensitive<\/em>&#8220;: &#8220;1&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;<em>delimiterSensitive<\/em>&#8220;: &#8220;1&#8221;<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0},<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0success: function(msg){ },<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0error: function() { }<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">});<\/span><\/p><\/blockquote>\n<p>The server returns a JSON-array with the following parameters:<\/p>\n<ul>\n<li><em><strong>text\u00a0<\/strong><\/em>\u2014 input set of characters.<\/li>\n<li><em><strong>result<\/strong><\/em> \u2014 n-grams list with their frequencies.<\/li>\n<li><strong><em>headline<\/em><\/strong> \u2014 statistical data.<\/li>\n<\/ul>\n<p>For example, the following reply will be formed on the above listed AJAX-request:<\/p>\n<blockquote><p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">[<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0{<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;text&#8221;: &#8220;\u0413\u0440\u0443\u0448\u0430 \u0446\u0432\u0456\u043b\u0430 \u0430\u043f\u043e\u0448\u043d\u0456 \u0433\u043e\u0434.<br \/>\n\u0423\u0441\u0435 \u0433\u0430\u043b\u0456\u043d\u044b \u044f\u0435, \u0443\u0441\u0435 \u0432\u044f\u043b\u0456\u043a\u0456\u044f \u0440\u0430\u0441\u043e\u0445\u0456, \u0434\u0430 \u0430\u043f\u043e\u0448\u043d\u044f\u0433\u0430 \u043f\u0440\u0443\u0446\u0456\u043a\u0430, \u0431\u044b\u043b\u0456 \u045e\u0441\u044b\u043f\u0430\u043d\u044b \u0431\u0443\u0439\u043d\u044b\u043c \u0431\u0435\u043b\u0430-\u0440\u0443\u0436\u043e\u0432\u044b\u043c \u0446\u0432\u0435\u0442\u0430\u043c. \u042f\u043d\u0430 \u043a\u0456\u043f\u0435\u043b\u0430, \u043c\u043b\u0435\u043b\u0430 \u0456 \u0440\u0430\u0441\u043a\u0430\u0448\u0430\u0432\u0430\u043b\u0430\u0441\u044f \u045e \u043f\u0447\u0430\u043b\u0456\u043d\u044b\u043c \u0437\u0432\u043e\u043d\u0435, \u0446\u044f\u0433\u043d\u0443\u043b\u0430 \u0434\u0430 \u0441\u043e\u043d\u0446\u0430 \u0441\u0442\u0430\u043b\u044b\u044f \u043b\u0430\u043f\u044b \u0456 \u0440\u0430\u0441\u043f\u0443\u0441\u043a\u0430\u043b\u0430 \u045e \u044f\u0433\u043e \u0437\u0437\u044f\u043d\u043d\u0456 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0456\u044f, \u043a\u0432\u043e\u043b\u044b\u044f \u043f\u0430\u043b\u044c\u0446\u044b \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u0441\u0442\u043a\u0430\u045e. \u0406 \u0431\u044b\u043b\u0430 \u044f\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u043c\u0430\u0433\u0443\u0442\u043d\u0430\u044f \u0456 \u0441\u0432\u0435\u0436\u0430\u044f, \u0442\u0430\u043a \u0443\u0442\u0440\u0430\u043f\u0451\u043d\u0430 \u0441\u043f\u0440\u0430\u0447\u0430\u043b\u0456\u0441\u044f \u045e \u044f\u0435 \u0440\u0443\u0436\u043e\u0432\u044b\u043c \u0440\u0430\u0456 \u043f\u0447\u043e\u043b\u044b, \u0448\u0442\u043e, \u0437\u0434\u0430\u0432\u0430\u043b\u0430\u0441\u044f, \u043d\u0435 \u0431\u0443\u0434\u0437\u0435 \u0451\u0439 \u0437\u0432\u043e\u0434\u0443 \u0456 \u043d\u0435 \u0431\u0443\u0434\u0437\u0435 \u0451\u0439 \u043a\u0430\u043d\u0446\u0430.&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;result&#8221;: &#8220;5: \u00ab\u043b\u0430 \u00bb<br \/>\n4: \u00ab\u044b\u043c \u00bb<br \/>\n4: \u00ab\u0440\u0430\u0441\u00bb<br \/>\n4: \u00ab \u0440\u0430\u00bb<br \/>\n4: \u00ab \u0456 \u00bb<br \/>\n3: \u00ab\u0435\u043b\u0430\u00bb<br \/>\n3: \u00ab \u0431\u0443\u00bb<br \/>\n3: \u00ab \u045e \u00bb<br \/>\n3: \u00ab\u0430 \u0441\u00bb<br \/>\n3: \u00ab\u0430\u043b\u0456\u00bb<br \/>\n3: \u00ab\u044f, \u00bb<br \/>\n3: \u00ab\u0430\u043b\u0430\u00bb<br \/>\n3: \u00ab\u043e\u0432\u044b\u00bb<br \/>\n3: \u00ab\u043d\u0430 \u00bb<br \/>\n2: \u00ab\u0437\u0432\u043e\u00bb<br \/>\n2: \u00ab\u0434\u0430 \u00bb<br \/>\n2: \u00ab \u0437\u0432\u00bb<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">&#8230;&#8221;,<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0 \u00a0 &#8220;headline&#8221;: &#8220;Number of units in the text: &lt;b&gt;408&lt;\/b&gt;&lt;br&gt;Number of unique &lt;b&gt;3-grams&lt;\/b&gt;: &lt;b&gt;316&lt;\/b&gt;&lt;br&gt;&#8221;<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">\u00a0 \u00a0}<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12px;\">]<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><strong>Links to sources<\/strong><\/p>\n<p>Service page:\u00a0<a href=\"https:\/\/corpus.by\/NgramFrequencyCounter\/?lang=be\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/corpus.by\/NgramFrequencyCounter\/?lang=be<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Tools &#8220;N-gram Frequency Counter&#8221; for counting the frequency of n number of elements frequency. Symbols and tokens can act as elements, as well as words and even regular expressions. Arbitrary characters is an input for the service. The result of the service is a list of n-grams with their frequencies in the input text. &nbsp; [&hellip;]<\/p>\n<a class = \"excerpt\" href=\"https:\/\/ssrlab.by\/en\/6661\">Read more...<\/a>","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,290,292],"tags":[],"_links":{"self":[{"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/posts\/6661"}],"collection":[{"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/comments?post=6661"}],"version-history":[{"count":7,"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/posts\/6661\/revisions"}],"predecessor-version":[{"id":7435,"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/posts\/6661\/revisions\/7435"}],"wp:attachment":[{"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/media?parent=6661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/categories?post=6661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssrlab.by\/en\/wp-json\/wp\/v2\/tags?post=6661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}