<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eduardo Andrade on Medium]]></title>
        <description><![CDATA[Stories by Eduardo Andrade on Medium]]></description>
        <link>https://medium.com/@dudsdu?source=rss-4ea6b82c6732------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3J9D0yxags0EQPVZ.</url>
            <title>Stories by Eduardo Andrade on Medium</title>
            <link>https://medium.com/@dudsdu?source=rss-4ea6b82c6732------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:27:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dudsdu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Culpado por Acidente?]]></title>
            <link>https://medium.com/@dudsdu/culpado-por-acidente-e432b8bf6482?source=rss-4ea6b82c6732------2</link>
            <guid isPermaLink="false">https://medium.com/p/e432b8bf6482</guid>
            <category><![CDATA[direito-civil]]></category>
            <category><![CDATA[gestão-governamental]]></category>
            <category><![CDATA[motocicleta]]></category>
            <category><![CDATA[acidente]]></category>
            <category><![CDATA[trânsito]]></category>
            <dc:creator><![CDATA[Eduardo Andrade]]></dc:creator>
            <pubDate>Fri, 22 Feb 2019 05:28:12 GMT</pubDate>
            <atom:updated>2020-01-03T15:56:34.599Z</atom:updated>
            <content:encoded><![CDATA[<h3>Acidente com Moto… A Culpa É de Quem?</h3><p>Relato aqui um caso que poderia ter afetado minha vida de forma extremamente negativa. Eu acabara de sair do trabalho e dirigia para minha academia de ginástica pela Avenida das Nações, ou via L4 Sul. A velocidade máxima dessa via é predominantemente 80Km/h, entretanto, no trecho em que eu estava (pouco ao Norte do Shopping Pier 21) a velocidade máxima é de 60 Km/h devido aos retornos existentes no trecho.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*V2cKlsxK9dIW2nEY5ldmPA.jpeg" /></figure><p>Eu, como de costume, usei o computador de bordo (cruise control) para a velocidade da via. A certa altura desse trecho de 60Km/h, na faixa da esquerda (eu pegaria o retorno logo à frente), havia (em 22/02/2019) um buraco bem no rumo do pneu esquerdo do carro. Eu dei um leve puxada para a direita para desviar da cratera. Nesse exato momento, à minha direita, vinha um motociclista (com um carona) acima da velocidade da via e sobre a faixa tracejada. Eu quase acertei o motociclista ao tentar desviar do buraco. Por sorte, minha manobra foi curta o suficiente para apenas desviar da panela na pista e não atingir o motoqueiro, que buzinou para mim em sinal de braveza.</p><p>Na mesma hora veio o pensamento de que aquela situação, além de machucar (ou coisa pior) duas pessoas, poderia ter causado um grande transtorno em minha vida. Eu poderia ter acertado o motociclista e teria parecido que eu cometera um ato de irresponsabilidade. Entretanto, raciocino, eu teria sido o menos culpado do imbroglio. Ora, mas como assim se eu teria machucado duas pessoas?</p><p>O primeiro culpado teria sido o Governo do Distrito Federal (GDF) por não manter as vias em condições adequadas de tráfego. A má condição asfáltica obrigou-me a fazer tal manobra para não danificar meu automóvel. Os impostos para manutenção da via estão devidamente pagos. A minha obrigação deste contrato social foi cumprida, mas não pelo Estado, ocioso de suas obrigações.</p><p>O segundo culpado teria sido o condutor da motocicleta. Primeiro por ele estar trafegando acima da velocidade da via. Segundo por me passar pela direita e com o agravante de ele estar trafegando sobre a faixa seccionada. Ora, penso eu, a faixa é para dividir duas pistas e não para trafegar em cima dela. Essa ação, embora imprudente, é costume dos motociclistas (ou motoqueiros) e, pasmem, não é proibida por lei (<a href="http://www.planalto.gov.br/ccivil_03/LEIS/L9503.htm">Código Nacional de Trânsito</a>). É até admissível que motociclistas andem no corredor entre os carros quando estes estiverem parados devido a semáforos ou congestionamentos (como sugerido pelo <a href="https://www.camara.leg.br/proposicoesWeb/fichadetramitacao?idProposicao=544948">Projeto de Lei 3886/2012</a>). Porém, trafegar em cima da faixa numa via de alta velocidade e (pior ainda) acima do limite equivale a suicídio. Carros, algumas vezes, precisam mudar de pista e um motoqueiro pode &quot;atropelar&quot; um carro.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*O56xCASbkfdjnW7S7HbuBg.gif" /><figcaption>Moto atropelando carro</figcaption></figure><p>Fico pensando se um juiz me absolveria caso o acidente tivesse se consumado. Nesse tipo de situação, parece que a vítima é aquele que se machuca. Todavia acredito que a má gestão pública e a imprudência do motoqueiro teriam me arremessado a maus bocados, traumas e inconveniências. Apesar de os danos físicos, em tese, serem dos ocupantes da motocicleta, acredito que a vítima da situação teria sido eu. Principalmente na aparência de culpado. E como se diz: até provar que focinho de porco não é tomada… sei não… eu estaria ferrado!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e432b8bf6482" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Topic Modelling for Finding Similar Contracts]]></title>
            <link>https://medium.com/@dudsdu/topic-modelling-for-finding-similar-contracts-df00b3aea8b2?source=rss-4ea6b82c6732------2</link>
            <guid isPermaLink="false">https://medium.com/p/df00b3aea8b2</guid>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Eduardo Andrade]]></dc:creator>
            <pubDate>Sun, 05 Nov 2017 13:34:29 GMT</pubDate>
            <atom:updated>2017-11-05T14:20:15.839Z</atom:updated>
            <content:encoded><![CDATA[<p>Legal contracts are always subject of being contested on court. When this happens, losses can be inflicted to the contractors and, in some cases, to the settlers of the deed. This article makes an initial assessment on how to use text similarities to mitigate risks on a new contract, based on the assumption that if a new contract is similar to a existent one that has been proved to be resilient, the risk of this new contract being the cause of financial loss is minimised.</p><p>This work used Discretionary Trust Deeds as the kind of contracts to be assessed. The corpus is composed of 25 documents (unfortunately too few). The approach used was to perform a topic modelling on these documents. New trust deeds, or contracts, would be input to this model and the output would indicate if the new contract is closer to resilient or to poor existent ones, as depicted by the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*YSB4Vf1pU6QpF6lNtjRk3Q.png" /></figure><h3>Text Preprocessing</h3><p>The Python programming language was used to perform this operation. As the documents were in Word (doc and docx) and PDF formats, the <a href="http://textract.readthedocs.io/en/latest/index.html">textract</a> API was used to import the document. With it, all the documents could be imported by just one way. The problem is that this library extracts all the texts, including macros and other details of the documents.</p><p>So, as usual, the text was preprocessed and cleaned by using regular expression. This is a boring task that requires one to cleaning and rereading the text multiple times until a clean enough text is obtained.</p><p>After this first cleaning, a <em>filtering</em> was also performed. The parts-of-speech tagging from <a href="https://spacy.io/">Spacy API</a> was used for this filtering. Only, nouns, adjectives and verbs (words that may convey concepts) were left on the documents. An excerpt of the final text can be seen in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JiV9ylckrOAJoo9YxVDOTQ.png" /><figcaption>POS Filtering — before (top) and after (bottom)</figcaption></figure><h3>Modelling</h3><p>This work used the LDA (Latent Dirichlet Allocation) model implemented by the <a href="https://radimrehurek.com/gensim/index.html">Gensim API</a> to capture the distribution of topics among documents. The topics are created considering the frequency of the terms in the documents of the corpus. This work used a simple bag of word, or <a href="https://en.wikipedia.org/wiki/Document-term_matrix">term-document matrix</a> (a <a href="https://en.wikipedia.org/wiki/Tf%E2%80%93idf">TF-IDF</a> can also be used to create LDA models). The LDA algorithm creates the number of topics specified when it fits the corpus, and each topic has a set of tuples composed of terms and frequencies, indicating the occurrence of each term in each topic. The frequency of the terms in each topic is a <em>signature</em> of the topic, turning them unique. The two figures below depicts the signature of two different topics found from the corpus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*07z07U3kbSxl6iN8slwbag.png" /><figcaption>Terms Frequency of Topic 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*yoWmFhodOb9XBIrcJVlsnQ.png" /><figcaption>Terms Frequency of Topic 2</figcaption></figure><p>It is important to notice that topics aren’t named as we intuitively tend to think. They are just a list of terms and frequency.</p><p>Similarly, each document can be described by a list of topics and values that relates the topics with the document. Let’s take a look at the topics of some documents to see this relation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3gxZN558lfXFeQWHqBEwxg.png" /></figure><p>In the figure above, we can see that document 3 is related with topics 3, 27, 39, 40 and 44. The probabilities next to the topic numbers indicates the how strong the topic is correlated to the text. Document 12 is related with topics 10, 22, 36, 37, 40 and 47. Document 17 is related with topics 3, 14, 27, 40 and 44. The list of topics and correlation is unique among documents and can also be considered the <em>signature</em> of the document. We can depict this relation visually, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*5EAyqUlpGUHBBpzTjIqfHQ.png" /></figure><p>Each line represents a document. The 50 topics are on the X axis and the correlations are on the Y axis. By observing the lines, we can see that the blue (document 3) and the red (document 17) lines are more closer to each other than to the green line (document 12).</p><p>As the topics calculated by the LDA model are a vectorised representation of each document, it is possible to calculate how similar they are by a metric called <a href="https://en.wikipedia.org/wiki/Cosine_similarity">cosine similarity</a>. The figure below calculates the similarity among these documents and shows the results. The similarity ranges from -1 to 1 and larger numbers mean more similar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jtx-s8DrvkhnuC01lXLuEA.png" /></figure><p>As we intuitively saw above in the form of lines is proved in the form of numbers by these calculations. The cosine similarity informs that documents 3 and 17 are the most similar ones among the three selected documents. In this way, LDA models can be used to cluster documents considering how close they are from each other.</p><h3>Business Use</h3><p>Taking this technique back to the business world, clusters of similar documents can be assessed to check which clusters are composed of resilient contracts. Then, the model can be used to calculate in which cluster a new contract would fall next to. This would indicate that the new contract is likely to be resilient or weak, according to the characteristic of the cluster it belongs to.</p><h3>Conclusion</h3><p>This work presents a way to classify contracts according to the LDA topic modelling technique. Hopefully, this text allows one to make sense that this idea is feasible. A plot depicting the cluster of documents could be a good visualisation for one the see how the documents can be clustered and this is in the todo list of this author.</p><p>This author intends to make an assessment of this technique using the Australian Federal Laws to assess if the laws would be clustered by similar meanings. Check back to see the results of this trial and take your conclusions about the application of this technique in a real business scenario.</p><h3>Source Code</h3><p>All source code, except files reading can be found in the gist below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5892484d7fbd32d8c2769f2395eb849c/href">https://medium.com/media/5892484d7fbd32d8c2769f2395eb849c/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df00b3aea8b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Example of Word Cloud with Mask]]></title>
            <link>https://medium.com/@dudsdu/an-example-of-word-cloud-with-mask-4cbbd699fb14?source=rss-4ea6b82c6732------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cbbd699fb14</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[word-cloud]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Eduardo Andrade]]></dc:creator>
            <pubDate>Sat, 04 Nov 2017 13:23:36 GMT</pubDate>
            <atom:updated>2017-11-05T00:32:55.562Z</atom:updated>
            <content:encoded><![CDATA[<p>A word cloud is a pretty traditional, and maybe already old fashioned way to depict the content of a text or a corpus (a set of texts). Nevertheless it is still a good way to convey the general idea of the text. This form of communication can be further improved by generating a word cloud image which resembles the general idea of the text. This article intends to demonstrate how to generate such a word cloud.</p><p>This word cloud was generated in the context of an assignment where the goal was to assess Family Trust Deeds. The corpus was composed by a set of trust deeds templates. The preprocessing consisted of cleaning some &quot;mark ups&quot; from imported PDF and Word files. Then a parts of speech filtering was performed leaving only nouns and verbs into the text. With this, only the words that convey meaning regarding the trust deeds domain were left to compose the word cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kv4bRF5Pyj98fesTEtge2w.png" /></figure><p>The Python <a href="https://github.com/amueller/word_cloud">WordCloud API</a> was used to generate the word cloud; nevertheless, an image was necessary to be the mask onto the cloud should be generated. The image should somehow transmit the feeling of a Family Trust and could not be too detailed, otherwise, the algorithm would not be capable of clearly rendering the worlds into the borders of the shapes. The SVG image to the left was found at <a href="http://publicdomainpictures.net/">PublicDomainPictures.net</a> and could be used free of charge.</p><p>The word cloud image obtained from the corpus and using the mask above was the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*4BTHwaX4kt1Cbsn1hTKVng.png" /></figure><p>The code used to generate the image can be found in the Gist below. The variable <em>filtered_text</em> is the corpus already preprocessed as described above. The WordCloud constructor builds the object, while the wc.generate() method creates the image on memory. When plotting the image, the method wc.recolor() uses the mask image to render the word cloud with the colours of the mask.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/149479a083047e00c17bd59e3702148d/href">https://medium.com/media/149479a083047e00c17bd59e3702148d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cbbd699fb14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Named Entity Recognition for Unstructured Documents]]></title>
            <link>https://medium.com/@dudsdu/named-entity-recognition-for-unstructured-documents-c325d47c7e3a?source=rss-4ea6b82c6732------2</link>
            <guid isPermaLink="false">https://medium.com/p/c325d47c7e3a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[named-entity-recognition]]></category>
            <category><![CDATA[data-ethics]]></category>
            <category><![CDATA[data-privacy]]></category>
            <dc:creator><![CDATA[Eduardo Andrade]]></dc:creator>
            <pubDate>Sat, 04 Nov 2017 06:16:22 GMT</pubDate>
            <atom:updated>2017-11-04T06:30:11.767Z</atom:updated>
            <content:encoded><![CDATA[<p>Named Entity Recognition (NER) on unstructured text has numerous uses. Companies sometimes exchange documents (contracts for instance) with personal information. It may be the case that the personal information contained in these documents should be anonymised. It may also be the case that personal information should be anonymised before being accessed by certain level of employees. Another use would be to assess actions performed by the entities on large texts. NER can be used to tackle these and many other cases where person&#39;s must be identified in large sets of documents.</p><p>This post will assess the <a href="https://spacy.io/docs/api/entityrecognizer">Spacy API</a> and the <a href="https://nlp.stanford.edu/software/CRF-NER.shtml">Stanford Named Entity Recogniser</a> (<a href="http://nlp.stanford.edu/~manning/papers/gibbscrf3.pdf">Finkel et al 2005</a>) for anonymisation in the English language.</p><p>The text used to perform the anonymisation tests was inspired in the 1986 Fifa Wolrd Cup English team, and it is as the following:</p><p>“Gary Winston Lineker was an excellent football player.<br>GARY WINSTON LINEKER was a striker.<br>gary winston lineker was born in England.<br>gARY WiNsTon lInEker is married to Danielle Bux.<br>Gary W. Lineker, Kanny Sansom and Peter Shilton played together.<br>The defenders:<br> Gary Stevens<br> Kenny Sansom<br> Terry Butcher<br>The midfields were:<br> — Bryan Robson;<br> — Ray Wilkins;<br> — Chris Waddle.”</p><p>Some aspects were tackled in these texts:</p><ul><li>Writing names in unusual ways (e.g. ‘gARY’, ‘gary’, ‘GARY’)</li><li>Writing names without any character to separate them (which is the case of the list of the defenders)</li></ul><h3>The Spacy API</h3><p>The <a href="https://spacy.io/docs/api/language-models">&quot;en&quot; and the &quot;en_core_web_md&quot;</a> models were used to discover names in the text above. The latter, a huge model of 1GB. The correct evaluation rates were 0.47 and 0.79 respectively.</p><p>The strings &quot;GARY WINSTON LINEKER&quot;, &quot;gary winston lineker&quot;, &quot;gARY WiNsTon lInEker&quot; weren&#39;t correctly recognised by neither models. This fact shows us that Named Entity Recognition (NER) on Spacy models are case sensitive. The classifier, expects the names to be written with the first letter in upper case and the rest in lower case. An important lesson shall be taken here. Lowering case text preprocessing cannot be performed prior to named entity recognition with this models.</p><p>Another noticeable fact was that changing the bullet character from &quot;-&quot; to &quot;•&quot; dramatically changed the results. The names in the defenders list were all correctly recognised after updating the bullet character. The hit rate for both models jumped to 0.79. The only unrecognised names were the ones that did not follow the case pattern of proper names.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cf3e223b42614951620bf2dc16b4adc2/href">https://medium.com/media/cf3e223b42614951620bf2dc16b4adc2/href</a></iframe><h3>The Stanford Classifiers</h3><p>The &quot;Stanford NER is a Java implementation of a Named Entity Recognizer&quot; (<a href="https://nlp.stanford.edu/software/CRF-NER.shtml">https://nlp.stanford.edu/software/CRF-NER.shtml</a>). However, there is a Python wrapper (<a href="http://www.nltk.org/api/nltk.tag.html">StanfordNERTagger</a>)for this piece of software implemented in the <a href="http://www.nltk.org/">NLTK module</a>.</p><p>Three different classifiers were used:</p><ul><li>3class: Location, Person, Organization</li><li>4class: Location, Person, Organization, Misc</li><li>7class: Location, Person, Organization, Money, Percent, Date, Time</li></ul><p>Only the Person entity were assessed in this evaluation.</p><p>The Stanford Classifiers require us an extra job. They tag persons’ names, but do not identify multiple consecutive tagged names as just one individual. To illustrate what I mean, they recognised &quot;Peter&quot; and &quot;Shilton&quot; as person&#39;s names, but did not recognise &quot;Peter Shilton&quot; as a single entity. To overcome this limitation, I used a naive approach, which was to consider consecutive names as an entity&#39;s names. A more advanced approach, such as using Parts of Speech tagging, could have been used with better results.</p><p>The hit rates were 0.71, 0.64 and 0.64 for the 3class, 4class and 7class classifiers respectively for the text above. The biggest problem was, once again, the list of defensors. As they do not have any separator, the naive approach used to find distinct entities returned &quot;G<em>ary Stevens Kenny Sansom Terry Butcher</em>&quot; for that list. If a separator is used, the hit rate for the 3class classifier increases to 0.93. The only strings not recognised as persons is &quot;gary winston lineker&quot;.</p><p>The code and results for Stanford NER experiments can be found <a href="https://gist.github.com/AndradeEduardo/4c92b2a67d8077ec482f686521fe5c79">here</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2254da2bb96ad421b96ebb521dc7696b/href">https://medium.com/media/2254da2bb96ad421b96ebb521dc7696b/href</a></iframe><h3>Conclusion</h3><p>Both Spacy and Stanford NER models can be used for named entity recognition on unstructured documents achieving reasonably good outcomes. The former has the advantage of automatically recognising the entities out of the persons&#39; tokens. The latter is more flexible by distinguishing names typed on unconventional ways (not following the case pattern for proper names).</p><p>However, it was surprising that both models rely on letter casing for identifying named entities. Lowering the case of the text to be processed commonly one of the initial tasks of Natural Language Processing (NLP). This preprocessing task shall be performed after the NER task, as performing lowering case previously would ruin named entity recognition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MWNOCFoITl7Ygs-5B_9Mzw.png" /><figcaption>Hit Rate by API and Classifier</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c325d47c7e3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prospective Forensic Data Science — Is it possible to predict a crime and prevent it?]]></title>
            <link>https://medium.com/data-science/prospective-forensic-data-science-is-it-possible-to-predict-a-crime-and-prevent-it-28b48ba19825?source=rss-4ea6b82c6732------2</link>
            <guid isPermaLink="false">https://medium.com/p/28b48ba19825</guid>
            <category><![CDATA[forensic-science]]></category>
            <category><![CDATA[brazil]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Eduardo Andrade]]></dc:creator>
            <pubDate>Tue, 21 Mar 2017 12:02:20 GMT</pubDate>
            <atom:updated>2017-07-08T02:54:36.412Z</atom:updated>
            <content:encoded><![CDATA[<p>The digital footprint in social networks is already a source of information used for finding criminals. In Brazil, for instance, some cases related to racism are being instructed due to racist posts on FaceBook (FB). For example, the Afro-Brazilian TV and movie star <a href="https://en.wikipedia.org/wiki/Ta%C3%ADs_Ara%C3%BAjo#External_links">Tais Araújo</a>* was victim, on October 2015, of <a href="http://g1.globo.com/rio-de-janeiro/noticia/2015/11/atriz-tais-araujo-e-alvo-de-comentarios-racistas-em-rede-social.html">racist comments on facebook due to her color skin and hair style</a>. As a consequence, around <a href="https://tecnologia.uol.com.br/noticias/redacao/2015/11/04/cerca-de-30-perfis-do-facebook-serao-investigados-por-ofensas-a-tais-araujo.htm">30 people were investigated</a> based on their FB profile and <a href="http://veja.abril.com.br/entretenimento/cinco-suspeitos-sao-detidos-por-ataque-racista-a-tais-araujo/">five of them were actually arrested</a> due to their posts. On the contrary of those criminals think, the apparent anonymity given by a remote computer serves as the proof of their crimes. Good use for the digital footprints!</p><p>Furthermore, digital footprints are already being used to prevent potentially more harmful crimes. Prior to Olympic Summer games held in Rio de Janeiro, the <a href="https://en.wikipedia.org/wiki/Federal_Police_of_Brazil">Brazilian Federal Police</a> identified <a href="http://epoca.globo.com/tempo/noticia/2016/07/pf-prende-celula-do-estado-islamico-que-planejava-atentado-na-rio-2016.html">a group supposedly linked to ISIS that was planning a terrorist attack on the olympic facilities</a>. This group was using Facebook and Twitter to praise ISIS and celebrate terrorist attacks around the world. They were also employing instant messaging applications such as WhatsApp and Telegram to exchange information and plan their attacks. Federal Police broke their communication and revealed their plans, which was enough to typify their acts as criminal.</p><p>From this kind of crime comes another question: shall instant messaging service providers brake their users conversations in order to collaborate with authorities? <a href="https://www.constituteproject.org/constitution/Brazil_2014.pdf">Brazilian Constitution of 1988 (Art. 5, XII)</a> establishes that the secrecy one’s communication is inviolable, except if ordered otherwise by a Judge as an extraordinary measure and in situations defined by law. Of course this kind of digital communication did not exist by the time Brazilian Constitution was promulgated, but the Supreme Court extended this immunity to these new technologies. In May of 2016 <a href="http://www1.folha.uol.com.br/mercado/2016/05/1766886-whatsapp-sai-do-ar-por-72-horas-no-brasil-por-determinacao-da-justica.shtml">an extraordinary case happened </a>when the Federal Police was investigating drug producers and dealers. One federal judge from a small town ordered that FaceBook, WhatsApp owner, revealed the messages of the suspects. Facebook refused to do so alleging they didn’t have this information anymore. With the refusal, this particular judge ordered that WhatsApp had to be offline for 72 hours on all Brazilian territory. As this app is largely used in Brazil, including for business, all of Brazil became mad due to this decree. The sentence was executed for just a few hours as the decision was overwritten by a higher court.</p><p>The fact is that FaceBook has access to the content of WhatsApp users conversations. User agreement explicitly states it. This content is used to direct advertisement to users. The question is: should FaceBook and other instant messaging service providers store their users conversation and disclose them if requested by authorities? Or at least by Justice?</p><p>However, this history can have another chapter. If these instant messaging services have access to the content of their users&#39; chatting and by text analysis they can understand them, should they, in some controllable and legal scenario, alert authorities when there are strong evidences that their users are committing crimes? For instance, algorithms can be trained to recognise infant pornography images. Should they be used to identify this kind of crime when one send such kind of image to another?** Text analysis can be used to understand conversations about women slavery. Is it worth and fair to brake communication and possibly expose millions of people to discover this kind of crime? Further, these algorithms can be trained to identify when this crimes are still being planned. Could instant messaging providers warn policy when a crime is to be committed by a potential criminal?</p><p>Prospective Forensic Data Science can enable this scenario of crime fighting/preventing, which resembles Tom Cruise’s movie <a href="https://en.wikipedia.org/wiki/Minority_Report_(film)">Minority Report</a>. But, as in the movie, the prediction algorithms may commit errors or be biased (intentionally or not). With this, the life of an innocent may be ruined. Well… from this possible world a huge amount of ethical questions surges. Nevertheless this is not the subject of this post and these questions can emerge another time.</p><p>*References in Portuguese</p><p>**The simple act of sending this kind of image does not implicate a crime. For instance a psychologist may be sending such an image to another one to help in a case.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28b48ba19825" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/prospective-forensic-data-science-is-it-possible-to-predict-a-crime-and-prevent-it-28b48ba19825">Prospective Forensic Data Science — Is it possible to predict a crime and prevent it?</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>