<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: HorizonSync</title>
    <description>The latest articles on DEV Community by HorizonSync (@algorithmxy).</description>
    <link>https://dev.to/algorithmxy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F219055%2F1ba07f52-5069-470e-a660-8067907b8959.png</url>
      <title>DEV Community: HorizonSync</title>
      <link>https://dev.to/algorithmxy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/algorithmxy"/>
    <language>en</language>
    <item>
      <title>Personality Determination Algorithm.</title>
      <dc:creator>HorizonSync</dc:creator>
      <pubDate>Sun, 23 Feb 2020 03:33:24 +0000</pubDate>
      <link>https://dev.to/algorithmxy/personality-determination-algorithm-765</link>
      <guid>https://dev.to/algorithmxy/personality-determination-algorithm-765</guid>
      <description>&lt;p&gt;Using &lt;b&gt;Linguistic Analysis Techniques&lt;/b&gt; we could determine the personality and influence of someone based on text, the steps towards determining influence involves &lt;b&gt;word frequency&lt;/b&gt; usually a person of bad influence would perhaps do unhealthy things or depending on your definition of bad influence, they probably wouldn't be able to curse a lot either. If we apply the non-cursing rule(which they can curse but excessive amounts of cursing would be added to "bad influence" category, the steps you could take in this case is:&lt;br&gt;&lt;b&gt;1. Blacklist file&lt;br&gt;2. Frequency count towards blacklisted words.&lt;/b&gt;&lt;br&gt; So if they said &lt;i&gt;let's go to that &lt;b&gt;censored&lt;/b&gt; house and pop &lt;b&gt;censored&lt;/b&gt;&lt;/i&gt; using the frequency count of blacklisted words we would know that they said a blacklisted word 2 times. Does this make them bad influence? No but let's say that they increased the frequency count within a short amount of time. Usually a person that curses a lot rely on a lot of impulsiveness which they have a higher chance of being bad influence, in python we could implement:&lt;br&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Insert word: "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;blacklist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"punk"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"kill"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"drugs"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blacklist&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt;^NOTE: This example isn't necessarily recommended, it is suggested that you don't allow user input, but rather user data in a file.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;And what you could do to make it better is by converting the input into a list using &lt;b&gt;list()&lt;/b&gt; and split it by spaces using &lt;b&gt;split()&lt;/b&gt; or vice versa and then check if any of the strings are in the blacklist, if so get the index of the blacklisted word and put it within &lt;b&gt;x.count(blacklist[index])&lt;/b&gt; and then compare it with the user inputted list and see how many times it occurred, and then based on the occurrences, tag it as either negative or positive and using this small intel we could try to determine the personality even further.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;References:&lt;/b&gt;&lt;br&gt;&lt;a href="https://monkeylearn.com/text-analysis/"&gt;https://monkeylearn.com/text-analysis/&lt;/a&gt;&lt;br&gt;&lt;a href="https://docs.google.com/document/d/1cAqOFXADD68df1q73IdZpSk3iYzgQU426HS7zjJo7K8/edit?usp=drivesdk"&gt;unfinished research paper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also using datasets of positive, negative and multiple phrases used by people with certain disorders you could even take this a bit further. e.g. determining if someone is psychotic based on common usage of words that other psychopaths have used, like most psychopathic serial killers are philosophical for example. This of course could be inaccurate at times but it's also more good clues. also it's a recommended step for the potential to spot possible malicious activities and people.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>algorithms</category>
      <category>python</category>
    </item>
  </channel>
</rss>
