<?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 Stephen Savoia on Medium]]></title>
        <description><![CDATA[Stories by Stephen Savoia on Medium]]></description>
        <link>https://medium.com/@ssavoia?source=rss-41f98820c1ca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DKa-KyIayLJZuoJV.</url>
            <title>Stories by Stephen Savoia on Medium</title>
            <link>https://medium.com/@ssavoia?source=rss-41f98820c1ca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:24:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ssavoia/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[Developing natural language processing systems for legal contract analysis]]></title>
            <link>https://medium.com/@ssavoia/developing-natural-language-processing-systems-for-legal-contract-analysis-4ad2d94fff12?source=rss-41f98820c1ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ad2d94fff12</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Stephen Savoia]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 14:26:01 GMT</pubDate>
            <atom:updated>2018-04-19T18:13:32.126Z</atom:updated>
            <content:encoded><![CDATA[<p>Every organization must invest in Artificial Intelligence (AI) and machine learning (ML) to improve the time to accurate decisions and automate processes, freeing up employees to do critical planning and active support work. Machine learning may have taken the tech world by storm in development of analysis tools, recommendation systems, and complex event processing, but its adoption in traditional professions and industries has yet to reach its full potential. Modernizing our approach to data collection and processing is an incredible value proposition for professions and industries that have significant time intensive tasks which, thanks to novel “data science” techniques, can be easily automated. Recently <a href="https://sflscientific.com/">SFL Scientific</a> worked with <a href="https://www.linksquares.com/">Linksquares</a>, a company that specializes in automating the search and reporting process around company contracts, to change the way businesses conduct contract review.</p><p>SFL enables organizations to assess their capabilities, develop use-cases, and to perform a technology audit of their current processes across divisions and business lines. The goal is to identify and focus on business driven prototypes and their integration back to the company, creating novel systems or products around their data and machine learning. We assist business leaders to understand and evaluate areas for accelerating this technical growth.</p><p>For legal and finance departments time is extremely valuable, and the need for automation spans every industry, no matter the company size. If the time it takes to review one contract is significantly reduced down to seconds, the aggregate savings across initial legal review, change orders, and digitizing the final record keeping process, has tremendous business impact. The time savings from not having to manually sift through the legal speak and verbosity, standard phrases, and insertions in contracts can be spent elsewhere, helping the organization in more critical areas and negotiations.</p><p>Natural Language Processing (NLP) algorithms developed in the last two years, using machine and deep learning, are a significant step forward compared to previously employed text extraction algorithms. Early versions used decision trees with “hard” if-then rules which are, by nature, inflexible and lose contextual information critical to understanding meaning and variations. Machine learning algorithms abandon the decision tree model in favor of “soft” probabilistic decisions with real-value weights attached to each input. This type of model has a significant advantage in that they can express the relative certainty of many different possibilities rather than providing a single “certain” answer. Moreover, both the efficiency and accuracy of extraction, classification, and summarization has made leaps given the ability to provide labeled training data to these models.</p><p>SFL’s task was to provide LinkSquares with an NLP algorithm to perform two main operations: (1) Extract key terms from a legal document. (2) Classify tokenized text into pre-defined categories. The NLP algorithm that SFL delivered was then deployed through AWS, which ran the code on demand: Whenever a legal document was uploaded, SFL’s code was automatically launched. With AWS, the whole deployment into production process was streamlined and made easily accessible to all LinkSquares employees who needed access to this asset as well as users in any region of operation.</p><p>The text extraction algorithm consisted of three main steps:</p><p>1. Feature Engineering</p><p>2. Modeling — stacking ensemble</p><p>3. Post-processing Feature Engineering</p><p>First, the algorithm tokenizes the raw text of the legal documents using a regular expression tokenizer, which simply means that each word of the text is parsed and stored as an independent observation. Then, hundreds of features are created from the tokenized text in three ways: Rule-based features, token-based features, and sequence level classes as features. Rule-based features are created by matching a “fuzzy dictionary” to a set of predefined, known smart terms values. Hard-coded rules should translate to a known class. For example, North American states are hard-coded to be the “Governing Law” class. The classes determined from these hard-coded set of rules are saved as features. Token-based features are generated on a pertoken basis based on knowledge of the predefined, known smart terms.</p><p>The features are lumped into three general categories:</p><ul><li>Token level (Is this word a noun?)</li><li>Sentence-level (Is this token the first token in a sentence?)</li><li>Document-level (Is this token found in the X section?)</li></ul><p>Other examples of token-based features include items such as “Is the token capitalized?”, “How many letter ’A’s are there in the token?”, “How long is the token?”, “Is the next word a known smart term?”, etc.</p><p>Sequence-level features are generated by predicting the classes of each token using several sequence-level machine learning models: Conditional Random Field, Hidden Markov Model, N-gram model, and a neural network. Just as the rule-based classes are saved as features, the classes determined from these sequence-level machine learning models are also saved as features.</p><p>Since no single model or rule can guarantee a token is a specific class, a model stacking ensemble technique was implemented to better predict the class of a token. XGBoost (a gradient boosted decision tree-based model) was implemented as a meta-classifier, which uses the class predictions from the hardcoded rules and sequence-level models as features. The XGBoost meta-classifier also uses the hundreds of token-based features as predictors and is trained against the human or manually tagged data. XGBoost assigns a probability associated with each class prediction, so a probability threshold was determined from the probabilities assigned using a holdout set to maximize F-measure to determine the final class. Once the classes for each token were predicted via the XGBoost meta-classifier, the predictions were cleaned. Continuous tokens are concatenated with each other, enabling a more homogenous output. For example, dates are formatted into Month/Day/ Year as opposed to be left as a separate token for each value.</p><p>NLP’s ability to transform unstructured data into actionable, quantitative, structured data provides insights to value generation that are otherwise overlooked or require significant time and effort to uncover. Text-mining identifies facts and relationships that would otherwise remain buried in a mass of text faster and cheaper than humans could possibly achieve. By providing visualizations of the relationships between key concepts in unstructured texts, value can be extracted by understanding the relationships between disparate variables from different sources. LinkSquares was satisfied with the resulting algorithm and deployed the solution into production. It is estimated that over 100,000 legal documents have been analyzed, saving tens of thousands of human hours, and enabling their clients to be more streamlined, transparent, and quantitative about their legal contracts.</p><p>The application of NLP across industries represents an incredible value in time savings for any task requiring text manipulation. From text analytics to automated data entry, NLP can change the way many traditional industries conduct their operations, saving time and money. Adoption of novel tools has proven a difficult task in organizations lacking experience and operational expertise in data science. We hope that by providing some insight and technical development, we can help organizations execute at the highest level and stay ahead of the curve.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ad2d94fff12" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>