From c2748dc6572bb4d31fef8f098f96e2cebf8f1b93 Mon Sep 17 00:00:00 2001 From: s443930 Date: Tue, 3 May 2022 20:10:12 +0200 Subject: [PATCH] Update main.py --- creatingModel.py | 123 +++++++++++++++++++++++++++++++++ heSaidEdgar.ipynb | 168 ++++++++++++++++++++++++++++++++++++++++++++++ main.ipynb | 20 ++++++ main.py | 142 ++++++--------------------------------- 4 files changed, 330 insertions(+), 123 deletions(-) create mode 100644 creatingModel.py create mode 100644 heSaidEdgar.ipynb diff --git a/creatingModel.py b/creatingModel.py new file mode 100644 index 0000000..d689262 --- /dev/null +++ b/creatingModel.py @@ -0,0 +1,123 @@ +import lzma +import re + +months = {'01': 'January', '02': 'February', '03': 'March', + '04': 'April', '05': 'May', '06': 'June', + '07': 'July', '08': 'August', '09': 'September', + '10': 'October', '11': 'November', '12': 'December'} + + +def dayToWord(day): + day = int(day) + if day > 3: + return str(day) + 'th' + elif day == 3: + return str(day) + 'rd' + elif day == 2 : + return str(day) + 'nd' + else: return str(day) + 'st' + +def numToWord(number): + number = int(number) + d = {1 : 'one', 2 : 'two', 3 : 'three', 4 : 'four', 5 : 'five', + 6 : 'six', 7 : 'seven', 8 : 'eight', 9 : 'nine', 10 : 'ten', + 11 : 'eleven', 12 : 'twelve', 13 : 'thirteen', 14 : 'fourteen', + 15 : 'fifteen', 16 : 'sixteen', 17 : 'seventeen', 18 : 'eighteen', + 19 : 'nineteen', 20 : 'twenty', + 30 : 'thirty', 40 : 'forty', 50 : 'fifty', 60 : 'sixty', + 70 : 'seventy', 80 : 'eighty', 90 : 'ninety' } + if number < 20: + return d[number] + else: + if number % 10 == 0: return d[number] + else: return d[number // 10 * 10] + '-' + d[number % 10] + +def labelJurisdiction(text, jurisdiction): + jurisdictions = [] + for match in re.finditer(jurisdiction, text): + tup = (match.start(), match.end(), 'JURISDICTION') + jurisdictions.append(tup) + return jurisdictions + +def labelEffectiveDate(text, date): + dates = [] + year, month, day = date.split('-') + + dateFormats = [month + '/' + day + '/' + year, + month + '/' + day + '/' + year[-2:], + month[1] + '/' + day + '/' + year, + month[1] + '/' + day[1] + '/' + year, + month[1] + '/' + day + '/' + year[-2:], + month[1] + '/' + day[1] + '/' + year[-2:], + dayToWord(day) + ' of ' + months[month] + ', ' + year, + dayToWord(day) + ' day of ' + months[month] + ', ' + year, + months[month] + ' ' + day + ', ' + year ] + + for format in dateFormats: + for match in re.finditer(format, text, flags=re.IGNORECASE): + tup = (match.start(), match.end(), 'EFFECTIVE_DATE') + dates.append(tup) + + return dates + +def labelParties(text, party): + parties = [] + if 'Inc' in party: + regular = '' + for word in party.split('_'): + regular += word + '(.*)' + party = regular + party = party.replace('_', ' ') + for match in re.finditer(party, text, flags=re.IGNORECASE): + tup = (match.start(), match.end(), 'PARTY') + parties.append(tup) + return parties + +def labelTerms(text, term): + terms = [] + term = term.split('_') + number = numToWord(term[0]) + units = term[1] + for match in re.finditer(number + ' ' + units, text, flags=re.IGNORECASE): + tup = (match.start(), match.end(), 'TERM') + terms.append(tup) + return terms + + +if __name__ == '__main__': + # Read NDAs with lzma + NDAs = [] + with lzma.open('train/in.tsv.xz') as f: + for line in f: + NDAs.append(line.decode('utf-8')) + + # Read expected information + expected = [] + with open('train/expected.tsv') as f: + for line in f: + expected.append(line.replace('\n', '')) + + # Expected to labeled entities + expectEntities = [] + for expect in expected: + entities = [] + for e in expect: + label, entity = e.split('=') + entities.append((label, entity)) + expectEntities.append(entities) + + + # Training data for Spacy + trainData =[] + for i in range(len(expectEntities)): + listOfEntities = [] + for entity in expectEntities[i]: + if entity[0] == 'effective_date': + listOfEntities.append(labelEffectiveDate(NDAs[i], entity[1])) + elif entity[0] == 'jurisdiction': + listOfEntities.append(labelJurisdiction(NDAs[i], entity[1])) + elif entity[0] == 'party': + listOfEntities.append(labelParties(NDAs[i], entity[1])) + else: listOfEntities.append(labelTerms(NDAs[i], entity[1])) + listOfEntities = [item for sublist in listOfEntities for item in sublist] + trainData.append((NDAs[i], {'entities': listOfEntities})) \ No newline at end of file diff --git a/heSaidEdgar.ipynb b/heSaidEdgar.ipynb new file mode 100644 index 0000000..9a6e4d4 --- /dev/null +++ b/heSaidEdgar.ipynb @@ -0,0 +1,168 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "import lzma\n", + "\n", + "NDAs = []\n", + "with lzma.open('train/in.tsv.xz') as f:\n", + " for line in f:\n", + " NDAs.append(line.decode('utf-8'))" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [], + "source": [ + "import spacy\n", + "from spacy import displacy\n", + "\n", + "nlp = spacy.load('NER')\n", + "\n", + "text = NDAs[9]\n", + "doc = nlp(text)\n", + "\n", + "effective_date = []\n", + "jurisdiction = []\n", + "party = []\n", + "term = []\n", + "\n", + "for word in doc.ents:\n", + " if word.label_ == 'effective_date':\n", + " effective_date.append(word.text)\n", + " elif word.label_ == 'jurisdiction':\n", + " jurisdiction.append(word.text)\n", + " elif word.label_ == 'party':\n", + " party.append(word.text)\n", + " else:\n", + " term.append(word.text)" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "12" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "jurisdiction.count('New York')" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [], + "source": [ + "juris = { j : jurisdiction.count(j) for j in jurisdiction}" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'New York': 12}" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "juris" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CompuDyne Corporation --> party\n", + "two years --> term\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n", + "CompuDyne Corporation --> party\n", + "two years --> term\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n", + "CompuDyne Corporation --> party\n", + "two years --> term\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n", + "CompuDyne Corporation --> party\n", + "two years --> term\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n", + "New York --> jurisdiction\n" + ] + } + ], + "source": [ + "text = NDAs[9]\n", + "doc = nlp(text)\n", + "for word in doc.ents:\n", + " print(word.text, '-->', word.label_)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "interpreter": { + "hash": "3a5b3979b9a2fc2c8e649de363a592bbf5a2c9da164843b1adb5b45661722ad0" + }, + "kernelspec": { + "display_name": "Python 3.8.10 64-bit", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.10" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/main.ipynb b/main.ipynb index 61aa840..ad6e880 100644 --- a/main.ipynb +++ b/main.ipynb @@ -1805,6 +1805,26 @@ "nlp.to_disk('NER')" ] }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'00a1d238e37ac225b8045a97953e845d.pdf\\teffective_date jurisdiction party term\\tEX-10.23 5 dex1023.htm COVENANT NOT TO COMPETE AND NON-DISCLOSURE AGREEMENT\\\\nExhibit 10.23\\\\nCOVENANT NOT TO COMPETE\\\\nAND NON-DISCLOSURE AGREEMENT\\\\nPARTIES:\\\\nEric Dean Sprunk (“EMPLOYEE”)\\\\nand\\\\nNIKE, Inc., divisions, subsidiaries\\\\nand affiliates. (“NIKE”):\\\\nRECITALS:\\\\nA. This Covenant Not to Compete and Non-Disclosure Agreement is executed upon initial employment or upon the EMPLOYEE’s\\\\nadvancement with NIKE and is a condition of such employment or advancement.\\\\nB. Over the course of EMPLOYEE’s employment with NIKE, EMPLOYEE will be or has been exposed to and/or is in a position to\\\\ndevelop confidential information peculiar to NIKE’s business and not generally known to the public as defined below (“Protected Information”). It is\\\\nanticipated that EMPLOYEE will continue to be exposed to Protected Information of greater sensitivity as EMPLOYEE advances in the company.\\\\nC. The nature of NIKE’s business is highly competitive and disclosure of any Protected Information would result in severe damage to NIKE\\\\nand be difficult to measure.\\\\nD. NIKE makes use of its Protected Information throughout the world. Protected Information of NIKE can be used to NIKE’s detriment\\\\nanywhere in the world.\\\\nAGREEMENT:\\\\nIn consideration of the foregoing, and the terms and conditions set forth below, the parties agree as follows:\\\\n1. Covenant Not to Compete.\\\\n(a) Competition Restriction. During EMPLOYEE’s employment by NIKE, under the terms of any employment contract or\\\\notherwise, and for one year thereafter, (the “Restriction Period”), EMPLOYEE will not directly or indirectly, own, manage, control, or participate in\\\\nthe ownership,\\\\nmanagement or control of, or be employed by, consult for, or be connected in any manner with, any business engaged anywhere in the world in the\\\\nathletic footwear, athletic apparel or sports equipment and accessories business, or any other business which directly competes with NIKE or any of\\\\nits parent, subsidiaries or affiliated corporations ( “Competitor”). By way of illustration only, examples of NIKE competitors include, but are not\\\\nlimited to: Adidas, FILA, Reebok, Puma, Champion, Oakley, DKNY, Converse, Asics, Saucony, New Balance, Ralph Lauren/Polo Sport, B.U.M,\\\\nFUBU, The Gap, Tommy Hilfiger, Umbro, Northface, Venator (Foot lockers), Sports Authority, Columbia Sportswear, Wilson, Mizuno, Callaway\\\\nGolf and Titleist. This provision is subject to NIKE’s option to waive all or any portion of the Restriction Period as more specifically provided\\\\nbelow.\\\\n(b) Extension of Time. In the event EMPLOYEE breaches this covenant not to compete, the Restriction Period shall automatically\\\\ntoll from the date of the first breach, and all subsequent breaches, until the resolution of the breach through private settlement, judicial or other\\\\naction, including all appeals. The Restriction Period shall continue upon the effective date of any such settlement judicial or other resolution. NIKE\\\\nshall not be obligated to pay EMPLOYEE the additional compensation described in paragraph 1(d) below during any period of time in which this\\\\nAgreement is tolled due to EMPLOYEE’s breach. In the event EMPLOYEE receives such additional compensation after any such breach,\\\\nEMPLOYEE must immediately reimburse NIKE in the amount of all such compensation upon the receipt of a written request by NIKE.\\\\n(c) Waiver of Non-Compete. NIKE has the option, in its sole discretion, to elect to waive all or a portion of the Restriction Period or\\\\nto limit the definition of Competitor, by giving EMPLOYEE seven (7) days prior notice of such election. In the event all or a portion of the\\\\nRestriction Period is waived, NIKE shall not be obligated to pay EMPLOYEE for any period of time as to which the covenant not to compete has\\\\nbeen waived.\\\\n(d) Additional Consideration. As additional consideration for the covenant not to compete described above, should NIKE terminate\\\\nEMPLOYEE’s employment and elect to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly payment equal to one\\\\nhundred percent (100%) of EMPLOYEE’s last monthly base salary while the Restriction Period is in effect. If EMPLOYEE voluntarily terminates\\\\nemployment and NIKE elects to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly severance payment equal to fifty\\\\npercent (50%) of EMPLOYEE’s last monthly base salary while the Restriction Period is in effect. The first payment to EMPLOYEE of additional\\\\nconsideration shall follow on the next applicable pay period after the election to enforce the non-competition agreement, payable in accordance with\\\\nNIKE’s payroll practices.\\\\n2. Subsequent Employer. EMPLOYEE agrees to notify NIKE at the time of separation of employment of the name of EMPLOYEE’s new\\\\nemployer, if known. EMPLOYEE further agrees to disclose to NIKE the name of any subsequent employer during the Restriction Period, wherever\\\\nlocated and regardless of whether such employer is a competitor of NIKE.\\\\n3. Non-Disclosure Agreement.\\\\n(a) Protected Information Defined. “Protected Information” shall mean all proprietary information, in whatever form and format, of\\\\nNIKE and all information provided to NIKE by third parties which NIKE is obligated to keep confidential. EMPLOYEE agrees that any and all\\\\ninformation to which EMPLOYEE has access concerning NIKE projects and internal NIKE information is Protected Information, whether in verbal\\\\nform, machine-readable form, written or other tangible form, and whether designated as confidential or unmarked. Without limiting the foregoing,\\\\nProtected Information includes information relating to NIKE’s research and development activities, its intellectual property and the filing or\\\\npendency of patent applications, confidential techniques, methods, styles, designs, design concepts and ideas, customer and vendor lists, contract\\\\nfactory lists, pricing information, manufacturing plans, business and marketing plans, sales information, methods of operation, manufacturing\\\\nprocesses and methods, products, and personnel information.\\\\n(b) Excluded Information. Notwithstanding paragraph 3(a), Protected Information excludes any information that is or becomes part\\\\nof the public domain through no act or failure to act on the part of EMPLOYEE. Specifically, employees shall be permitted to retain as part of their\\\\npersonal portfolio copies of the employees’ original artwork and designs, provided the artwork or designs have become part of the public domain. In\\\\nany dispute between the parties with respect to this exclusion, the burden of proof will be on EMPLOYEE and such proof will be by clear and\\\\nconvincing evidence.\\\\n(c) Employee’s Obligations. During the period of employment by NIKE and for a period of two (2) years thereafter, EMPLOYEE\\\\nwill hold in confidence and protect all Protected Information and will not, at any time, directly or indirectly, use any Protected Information for any\\\\npurpose outside the scope of EMPLOYEE’s employment with NIKE or disclose any Protected Information to any third person or organization\\\\nwithout the prior written consent of NIKE. Specifically, but not by way of limitation, EMPLOYEE will not ever copy, transmit, reproduce,\\\\nsummarize, quote, publish or make any commercial or other use whatsoever of any Protected Information without the prior written consent of NIKE.\\\\nEMPLOYEE will also take reasonable security precautions and such other actions as may be necessary to insure that there is no use or disclosure,\\\\nintentional or inadvertent, of Protected Information in violation of this Agreement.\\\\n4. Return of Protected Information. At the request of NIKE at anytime, and in any event, upon termination of employment, EMPLOYEE\\\\nshall immediately return to NIKE all confidential documents, including tapes, notebooks, drawings, computer disks and other similar repositories of\\\\nor containing Protected Information, and all copies thereof, then in EMPLOYEE’s possession or under EMPLOYEE’s control.\\\\n5. Unauthorized Use. During the period of employment with NIKE and thereafter, EMPLOYEE will notify NIKE immediately if\\\\nEMPLOYEE becomes aware of the unauthorized possession, use or knowledge of any Protected Information by any person employed or not\\\\nemployed by NIKE at the time of such possession, use or knowledge. EMPLOYEE will cooperate with NIKE in the investigation of any such\\\\nincident and will cooperate with NIKE in any litigation with third parties deemed necessary by NIKE to protect the Protected Information. NIKE\\\\nshall provide reasonable reimbursement to EMPLOYEE for each hour so engaged and that amount shall not be diminished by operation of any\\\\npayment under Paragraph 1(d) of this Agreement.\\\\n6. Non-Recruitment. During the term of this Agreement and for a period of one (1) year thereafter, EMPLOYEE will not directly or\\\\nindirectly , solicit, divert or hire away (or attempt to solicit, divert or hire away) to or for himself or any other company or business organization, any\\\\nNIKE employee, whether or not such employee is a full-time employee or temporary employee and whether or not such employment is pursuant to a\\\\nwritten agreement or is at will.\\\\n7. Accounting of Profits. EMPLOYEE agrees that, if EMPLOYEE should violate any term of this Agreement, NIKE shall be entitled to an\\\\naccounting and repayment of all profits, compensation, commissions, remuneration or benefits which EMPLOYEE directly or indirectly has realized\\\\nand/or may realize as a result of or in connection with any such violation (including the return of any additional consideration paid by NIKE\\\\npursuant to Paragraph 1(d) above). Such remedy shall be in addition to and not in limitation of any injunctive relief or other rights or remedies to\\\\nwhich NIKE may be entitled at law or in equity.\\\\n8. General Provisions.\\\\n(a) Survival. This Agreement shall continue in effect after the termination of EMPLOYEE’s employment, regardless of the reason for\\\\ntermination.\\\\n(b) Waiver. No waiver, amendment, modification or cancellation of any term or condition of this Agreement will be effective unless\\\\nexecuted in writing by both parties. No written waiver will excuse the performance of any act other than the act or acts specifically referred to\\\\ntherein.\\\\n(c) Severability. Each provision herein will be treated as a separate and independent clause and unenforceability of any one clause\\\\nwill in no way impact the enforceability of any other clause. Should any of the provisions in this Agreement be found to be unreasonable or invalid\\\\nby a court of competent jurisdiction, such provision will be enforceable to the maximum extent enforceable by the law of that jurisdiction.\\\\n(d) Applicable Law/Jurisdiction. This Agreement, and EMPLOYEE’s employment hereunder, shall be construed according to the\\\\nlaws of the State of Oregon. EMPLOYEE further hereby submits to the jurisdiction of, and agrees that exclusive jurisdiction over and venue for any\\\\naction or proceeding arising out of or relating to this Agreement shall lie in the state and federal courts located in Oregon.\\\\nEMPLOYEE\\\\nNIKE, Inc.\\\\n/s/ Eric Dean Sprunk\\\\nBy\\\\n/s/ Jeffrey M. Cava\\\\nDATE 04/18/01\\\\nName:\\\\nTitle:\\\\nJeffrey M. Cava\\\\nVice President, Global Human Resources\\tEX-10.23 5 dex1023.htm COVENANT NOT TO COMPETE AND NON-DISCLOSURE AGREEMENT\\\\nExhibit 10.23\\\\nCOVENANT NOT TO COMPETE\\\\nAND NON-DISCLOSURE AGREEMENT\\\\nPARTIES:\\\\nEric Dean Sprunk (“EMPLOYEE”)\\\\n \\\\nand\\\\nNIKE, Inc., divisions, subsidiaries\\\\nand affiliates. (“NIKE”):\\\\nRECITALS:\\\\nA. This Covenant Not to Compete and Non-Disclosure Agreement is executed upon initial employment or upon the EMPLOYEE’s\\\\nadvancement with NIKE and is a condition of such employment or advancement.\\\\nB. Over the course of EMPLOYEE’s employment with NIKE, EMPLOYEE will be or has been exposed to and/or is in a position to\\\\ndevelop confidential information peculiar to NIKE’s business and not generally known to the public as defined below (“Protected Information”). It is\\\\nanticipated that EMPLOYEE will continue to be exposed to Protected Information of greater sensitivity as EMPLOYEE advances in the company.\\\\nC. The nature of NIKE’s business is highly competitive and disclosure of any Protected Information would result in severe damage to NIKE\\\\nand be difficult to measure.\\\\nD. NIKE makes use of its Protected Information throughout the world. Protected Information of NIKE can be used to NIKE’s detriment\\\\nanywhere in the world.\\\\nAGREEMENT:\\\\nIn consideration of the foregoing, and the terms and conditions set forth below, the parties agree as follows:\\\\n1. Covenant Not to Compete.\\\\n(@) Competition Restriction. During EMPLOYEE’s employment by NIKE, under the terms of any employment contract or\\\\notherwise, and for one year thereafter, (the “Restriction Period”), EMPLOYEE will not directly or indirectly, own, manage, control, or participate in\\\\nthe ownership,\\\\nmanagement or control of, or be employed by, consult for, or be connected in any manner with, any business engaged anywhere in the world in the\\\\nathletic footwear, athletic apparel or sports equipment and accessories business, or any other business which directly competes with NIKE or any of\\\\nits parent, subsidiaries or affiliated corporations ( “Competitor”). By way of illustration only, examples of NIKE competitors include, but are not\\\\nlimited to: Adidas, FILA, Reebok, Puma, Champion, Oakley, DKNY, Converse, Asics, Saucony, New Balance, Ralph Lauren/Polo Sport, B.U.M,\\\\nFUBU, The Gap, Tommy Hilfiger, Umbro, Northface, Venator (Foot lockers), Sports Authority, Columbia Sportswear, Wilson, Mizuno, Callaway\\\\nGolf and Titleist. This provision is subject to NIKE’s option to waive all or any portion of the Restriction Period as more specifically provided\\\\nbelow.\\\\n(b) Extension of Time. In the event EMPLOYEE breaches this covenant not to compete, the Restriction Period shall automatically\\\\ntoll from the date of the first breach, and all subsequent breaches, until the resolution of the breach through private settlement, judicial or other\\\\naction, including all appeals. The Restriction Period shall continue upon the effective date of any such settlement judicial or other resolution. NIKE\\\\nshall not be obligated to pay EMPLOYEE the additional compensation described in paragraph 1(d) below during any period of time in which this\\\\nAgreement is tolled due to EMPLOYEE’s breach. In the event EMPLOYEE receives such additional compensation after any such breach,\\\\nEMPLOYEE must immediately reimburse NIKE in the amount of all such compensation upon the receipt of a written request by NIKE.\\\\n(c) Waiver of Non-Compete. NIKE has the option, in its sole discretion, to elect to waive all or a portion of the Restriction Period or\\\\nto limit the definition of Competitor, by giving EMPLOYEE seven (7) days prior notice of such election. In the event all or a portion of the\\\\nRestriction Period is waived, NIKE shall not be obligated to pay EMPLOYEE for any period of time as to which the covenant not to compete has\\\\nbeen waived.\\\\n(d) Additional Consideration. As additional consideration for the covenant not to compete described above, should NIKE terminate\\\\nEMPLOYEE’s employment and elect to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly payment equal to one\\\\nhundred percent (100%) of EMPLOY EE’s last monthly base salary while the Restriction Period is in effect. If EMPLOYEE voluntarily terminates\\\\nemployment and NIKE elects to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly severance payment equal to fifty\\\\npercent (50%) of EMPLOYEE’s last monthly base salary while the Restriction Period is in effect. The first payment to EMPLOYEE of additional\\\\nconsideration shall follow on the next applicable pay period after the election to enforce the non-competition agreement, payable in accordance with\\\\nNIKE\\'’s payroll practices.\\\\n2. Subsequent Employer. EMPLOYEE agrees to notify NIKE at the time of separation of employment of the name of EMPLOYEE’s new\\\\nemployer, if known. EMPLOYEE further agrees to disclose to NIKE the name of any subsequent employer during the Restriction Period, wherever\\\\nlocated and regardless of whether such employer is a competitor of NIKE.\\\\n3. Non-Disclosure Agreement.\\\\n(@) Protected Information Defined. “Protected Information” shall mean all proprietary information, in whatever form and format, of\\\\nNIKE and all information provided to NIKE by third parties which NIKE is obligated to keep confidential. EMPLOYEE agrees that any and all\\\\ninformation to which EMPLOYEE has access concerning NIKE projects and internal NIKE information is Protected Information, whether in verbal\\\\nform, machine-readable form, written or other tangible form, and whether designated as confidential or unmarked. Without limiting the foregoing,\\\\nProtected Information includes information relating to NIKE’s research and development activities, its intellectual property and the filing or\\\\npendency of patent applications, confidential techniques, methods, styles, designs, design concepts and ideas, customer and vendor lists, contract\\\\nfactory lists, pricing information, manufacturing plans, business and marketing plans, sales information, methods of operation, manufacturing\\\\nprocesses and methods, products, and personnel information.\\\\n(b) Excluded Information. Notwithstanding paragraph 3(a), Protected Information excludes any information that is or becomes part\\\\nof the public domain through no act or failure to act on the part of EMPLOYEE. Specifically, employees shall be permitted to retain as part of their\\\\npersonal portfolio copies of the employees’ original artwork and designs, provided the artwork or designs have become part of the public domain. In\\\\nany dispute between the parties with respect to this exclusion, the burden of proof will be on EMPLOYEE and such proof will be by clear and\\\\nconvincing evidence.\\\\n(c) Employee’s Obligations. During the period of employment by NIKE and for a period of two (2) years thereafter, EMPLOYEE\\\\nwill hold in confidence and protect all Protected Information and will not, at any time, directly or indirectly, use any Protected Information for any\\\\npurpose outside the scope of EMPLOYEE’s employment with NIKE or disclose any Protected Information to any third person or organization\\\\nwithout the prior written consent of NIKE. Specifically, but not by way of limitation, EMPLOYEE will not ever copy, transmit, reproduce,\\\\nsummarize, quote, publish or make any commercial or other use whatsoever of any Protected Information without the prior written consent of NIKE.\\\\nEMPLOYEE will also take reasonable security precautions and such other actions as may be necessary to insure that there is no use or disclosure,\\\\nintentional or inadvertent, of Protected Information in violation of this Agreement.\\\\n \\\\n4. Return of Protected Information. At the request of NIKE at anytime, and in any event, upon termination of employment, EMPLOYEE\\\\nshall immediately return to NIKE all confidential documents, including tapes, notebooks, drawings, computer disks and other similar repositories of\\\\nor containing Protected Information, and all copies thereof, then in EMPLOYEE’s possession or under EMPLOYEE’s control.\\\\n5. Unauthorized Use. During the period of employment with NIKE and thereafter, EMPLOYEE will notify NIKE immediately if\\\\nEMPLOYEE becomes aware of the unauthorized possession, use or knowledge of any Protected Information by any person employed or not\\\\nemployed by NIKE at the time of such possession, use or knowledge. EMPLOYEE will cooperate with NIKE in the investigation of any such\\\\nincident and will cooperate with NIKE in any litigation with third parties deemed necessary by NIKE to protect the Protected Information. NIKE\\\\nshall provide reasonable reimbursement to EMPLOYEE for each hour so engaged and that amount shall not be diminished by operation of any\\\\npayment under Paragraph 1(d) of this Agreement.\\\\n6. Non-Recruitment. During the term of this Agreement and for a period of one (1) year thereafter, EMPLOYEE will not directly or\\\\nindirectly , solicit, divert or hire away (or attempt to solicit, divert or hire away) to or for himself or any other company or business organization, any\\\\nNIKE employee, whether or not such employee is a full-time employee or temporary employee and whether or not such employment is pursuant to a\\\\nwritten agreement or is at will.\\\\n7. Accounting of Profits. EMPLOYEE agrees that, if EMPLOYEE should violate any term of this Agreement, NIKE shall be entitled to an\\\\naccounting and repayment of all profits, compensation, commissions, remuneration or benefits which EMPLOYEE directly or indirectly has realized\\\\nand/or may realize as a result of or in connection with any such violation (including the return of any additional consideration paid by NIKE\\\\npursuant to Paragraph 1(d) above). Such remedy shall be in addition to and not in limitation of any injunctive relief or other rights or remedies to\\\\nwhich NIKE may be entitled at law or in equity.\\\\n8. General Provisions.\\\\n(@) Survival. This Agreement shall continue in effect after the termination of EMPLOYEE’s employment, regardless of the reason for\\\\ntermination.\\\\n(b) Waiver. No waiver, amendment, modification or cancellation of any term or condition of this Agreement will be effective unless\\\\nexecuted in writing by both parties. No written waiver will excuse the performance of any act other than the act or acts specifically referred to\\\\ntherein.\\\\n(c) Severability. Each provision herein will be treated as a separate and independent clause and unenforceability of any one clause\\\\nwill in no way impact the enforceability of any other clause. Should any of the provisions in this Agreement be found to be unreasonable or invalid\\\\nby a court of competent jurisdiction, such provision will be enforceable to the maximum extent enforceable by the law of that jurisdiction.\\\\n(d) Applicable Law/Jurisdiction. This Agreement, and EMPLOYEE’s employment hereunder, shall be construed according to the\\\\nlaws of the State of Oregon. EMPLOYEE further hereby submits to the jurisdiction of, and agrees that exclusive jurisdiction over and venue for any\\\\naction or proceeding arising out of or relating to this Agreement shall lie in the state and federal courts located in Oregon.\\\\nEMPLOYEE NIKE, Inc.\\\\n/s/ Eric Dean Sprunk By /s/ Jeffrey M. Cava\\\\nName: Jeffrey M. Cava\\\\nDATE 04/18/01 Title: Vice President, Global Human Resources\\tEX-10.23 5 dlex1023.htm COVENANT NOT TO COMPETE AND NON-DISCLOSURE AGREEMENT\\\\nExhibit 10.23\\\\nCOVENANT NOT TO COMPETE\\\\nAND NON-DISCLOSURE AGREEMENT\\\\nPARTIES:\\\\nEric Dean Sprunk (\"EMPLOYEE\")\\\\nand\\\\nNIKE, Inc., divisions, subsidiaries\\\\nand affiliates. (\"NIKE\"):\\\\nRECITALS:\\\\nA. This Covenant Not to Compete and Non-Disclosure Agreement is executed upon initial employment or upon the EMPLOYEE\\'S\\\\nadvancement with NIKE and is a condition of such employment or advancement.\\\\nB. Over the course of EMPLOYEE\\'S employment with NIKE, EMPLOYEE will be or has been exposed to and/or is in a position to\\\\ndevelop confidential information peculiar to NIKE\\'s business and not generally known to the public as defined below (\"Protected Information\").\\\\nIt\\\\nis\\\\nanticipated that EMPLOYEE will continue to be exposed to Protected Information of greater sensitivity as EMPLOYEE advances in the company.\\\\nC.\\\\nThe nature of NIKE\\'s business is highly competitive and disclosure of any Protected Information would result in severe damage to NIKE\\\\nand be difficult to measure.\\\\nD. NIKE makes use of its Protected Information throughout the world. Protected Information of NIKE can be used to NIKE\\'s detriment\\\\nanywhere in the world.\\\\nAGREEMENT:\\\\nIn consideration of the foregoing, and the terms and conditions set forth below, the parties agree as follows:\\\\n1. Covenant Not to Compete.\\\\n(a) Competition Restriction During EMPLOYEE\\'S employment by NIKE, under the terms of any employment contract\\\\nor\\\\notherwise, and for one year thereafter, (the \"Restriction Period\"), EMPLOYEE will not directly or indirectly, own, manage, control, or participate in\\\\nthe ownership,\\\\nmanagement or control of, or be employed by, consult for, or be connected in any manner with, any business engaged anywhere in the world in the\\\\nathletic footwear, athletic apparel or sports equipment and accessories business, or any other business which directly competes with NIKE or any\\\\nof\\\\nits parent, subsidiaries or affiliated corporations C \"Competitor\"). By way of illustration only, examples of NIKE competitors include, but are not\\\\nlimited to: Adidas, FILA, Reebok, Puma, Champion, Oakley, DKNY, Converse, Asics, Saucony, New Balance, Ralph Lauren/Polo Sport, B.U.M,\\\\nFUBU, The Gap, Tommy Hilfiger, Umbro, Northface, Venator (Foot lockers), Sports Authority, Columbia Sportswear, Wilson, Mizuno, Callaway\\\\nGolf and Titleist. This provision is subject to NIKE\\'s option to waive all or any portion of the Restriction Period as more specifically provided\\\\nbelow.\\\\n(b)\\\\nExtension of Time. In the event EMPLOYEE breaches this covenant not to compete, the Restriction Period shall automatically\\\\ntoll from the date of the first breach, and all subsequent breaches, until the resolution of the breach through private settlement, judicial or other\\\\naction, including all appeals. The Restriction Period shall continue upon the effective date of any such settlement judicial or other resolution. NIKE\\\\nshall not be obligated to pay EMPLOYEE the additional compensation described in paragraph 1(d) below during any period of time in which this\\\\nAgreement is tolled due to EMPLOYEE\\'S breach. In the event EMPLOYEE receives such additional compensation after any such breach,\\\\nEMPLOYEE must immediately reimburse NIKE in the amount of all such compensation upon the receipt of a written request by NIKE.\\\\n(c) Waiver of Non-Compete. NIKE has the option, in its sole discretion, to elect to waive all or a portion of the Restriction Period or\\\\nto limit the definition of Competitor, by giving EMPLOYEE seven (7) days prior notice of such election. In the event all or a portion of the\\\\nRestriction Period is waived, NIKE shall not be obligated to pay EMPLOYEE for any period of time as to which the covenant not to compete has\\\\nbeen waived.\\\\n(d) Additional Consideration. As additional consideration for the covenant not to compete described above, should NIKE terminate\\\\nEMPLOYEE\\'s employment and elect to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly payment equal to one\\\\nhundred percent (100%) of EMPLOYEE\\'S last monthly base salary while the Restriction Period is in effect. If EMPLOYEE voluntarily terminates\\\\nemployment and NIKE elects to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly severance payment equal to fifty\\\\npercent (50%) of EMPLOYEE\\'S last monthly base salary while the Restriction Period is in effect. The first payment to EMPLOYEE of additional\\\\nconsideration shall follow on the next applicable pay period after the election to enforce the non-competition agreement, payable in accordance with\\\\nNIKE\\'s payroll practices.\\\\n2. Subsequent Employer. EMPLOYEE agrees to notify NIKE at the time of separation of employment of the name of EMPLOYEE\\'S new\\\\nemployer, if known. EMPLOYEE further agrees to disclose to NIKE the name of any subsequent employer during the Restriction Period, wherever\\\\nlocated and regardless of whether such employer is a competitor of NIKE.\\\\n3.\\\\nNon-Disclosure Agreement.\\\\n(a) Protected Information Defined. \"Protected Information\" shall mean all proprietary information, in whatever form and format, of\\\\nNIKE and all information provided to NIKE by third parties which NIKE is obligated to keep confidential. EMPLOYEE agrees that any and all\\\\ninformation to which EMPLOYEE has access concerning NIKE projects and internal NIKE information is Protected Information, whether in verbal\\\\nform, machine-readable form, written or other tangible form, and whether designated as confidential or unmarked. Without limiting the foregoing,\\\\nProtected Information includes information relating to NIKE\\'s research and development activities, its intellectual property and the filing or\\\\npendency of patent applications, confidential techniques, methods, styles, designs, design concepts and ideas, customer and vendor lists, contract\\\\nfactory lists, pricing information, manufacturing plans, business and marketing plans, sales information methods of operation, manufacturing\\\\nprocesses and methods, products, and personnel information.\\\\n(b) Excluded Information. Notwithstanding paragraph 3(a), Protected Information excludes any information that is or becomes part\\\\nof the public domain through no act or failure to act on the part of EMPLOYEE. Specifically, employees shall be permitted to retain as part of their\\\\npersonal portfolio copies of the employees\\' original artwork and designs, provided the artwork or designs have become part of the public domain. In\\\\nany dispute between the parties with respect to this exclusion, the burden of proof will be on EMPLOYEE and such proof will be by clear and\\\\nconvincing evidence.\\\\n(c)\\\\nEmployee\\'s Obligations. During the period of employment by NIKE and for a period of two (2) years thereafter, EMPLOYEE\\\\nwill hold in confidence and protect all Protected Information and will not, at any time, directly or indirectly, use any Protected Information for any\\\\npurpose outside the scope of EMPLOYEE\\'S employment with NIKE or disclose any Protected Information to any third person or organization\\\\nwithout the prior written consent of NIKE. Specifically, but not by way of limitation, EMPLOYEE will not ever copy, transmit, reproduce,\\\\nsummarize, quote, publish or make any commercial or other use whatsoever of any Protected Information without the prior written consent of NIKE.\\\\nEMPLOYEE will also take reasonable security precautions and such other actions as may be necessary to insure that there is no use or disclosure,\\\\nintentional or inadvertent, of Protected Information in violation of this Agreement.\\\\n4. Return of Protected Information. At the request of NIKE at anytime, and in any event, upon termination of employment, EMPLOYEE\\\\nshall immediately return to NIKE all confidential documents, including tapes, notebooks, drawings, computer disks and other similar repositories of\\\\nor\\\\ncontaining Protected Information, and all copies thereof, then in EMPLOYEE\\'S possession or under EMPLOYEE\\'S control.\\\\n5.\\\\nUnauthorized Use. During the period of employment with NIKE and thereafter, EMPLOYEE wil notify NIKE immediately\\\\nif\\\\nEMPLOYEE becomes aware of the unauthorized possession, use or knowledge of any Protected Information by any person employed or not\\\\nemployed by NIKE at the time of such possession, use or knowledge. EMPLOYEE will cooperate with NIKE in the investigation of any such\\\\nincident and will cooperate with NIKE in any litigation with third parties deemed necessary by NIKE to protect the Protected Information. NIKE\\\\nshall provide reasonable reimbursement to EMPLOYEE for each hour so engaged and that amount shall not be diminished by operation of any\\\\npayment under Paragraph 1(d) of this Agreement.\\\\n6. Non-Recruitment. During the term of this Agreement and for a period of one (1) year thereafter, EMPLOYEE will not directly or\\\\nindirectly solicit, divert or hire away (or attempt to solicit, divert or hire away) to or for himself or any other company or business organization, any\\\\nNIKE employee, whether or not such employee is a full-time employee or temporary employee and whether or not such employment is pursuant to a\\\\nwritten agreement or is at will.\\\\n7. Accounting of Profits. EMPLOYEE agrees that, if EMPLOYEE should violate any term of this Agreement, NIKE shall be entitled to an\\\\naccounting and repayment of all profits, compensation, commissions, remuneration or benefits which EMPLOYEE directly or indirectly has realized\\\\nand/or may realize as a result of or in connection with any such violation (including the return of any additional consideration paid by NIKE\\\\npursuant to Paragraph 1(d) above). Such remedy shall be in addition to and not in limitation of any injunctive relief or other rights or remedies\\\\nto\\\\nwhich NIKE may be entitled at law or in equity.\\\\n8.\\\\nGeneral Provisions.\\\\n(a)\\\\nSurvival. This Agreement shall continue in effect after the termination of EMPLOYEE\\'S employment, regardless of the reason for\\\\ntermination.\\\\n(b) Waiver. No waiver, amendment, modification or cancellation of any term or condition of this Agreement will be effective unless\\\\nexecuted in writing by both parties. No written waiver will excuse the performance of any act other than the act or acts specifically referred to\\\\ntherein.\\\\n(c) Severability.. Each provision herein will be treated as a separate and independent clause and unenforceability of any one clause\\\\nwill in no way impact the enforceability of any other clause. Should any of the provisions in this Agreement be found to be unreasonable or invalid\\\\nby a court of competent jurisdiction, such provision will be enforceable to the maximum extent enforceable by the law of that jurisdiction.\\\\n(d) Applicable Law/Jurisdiction. This Agreement, and EMPLOYEE\\'S employment hereunder, shall be construed according to the\\\\nlaws\\\\nof\\\\nthe State of Oregon. EMPLOYEE further hereby submits to the jurisdiction of, and agrees that exclusive jurisdiction over and venue for any\\\\naction or proceeding arising out of or relating to this Agreement shall lie in the state and federal courts located in Oregon.\\\\nEMPLOYEE\\\\nNIKE, Inc.\\\\n/s/ Eric Dean Sprunk\\\\nBy\\\\n/s/ Jeffrey M. Cava\\\\nName: Jeffrey M. Cava\\\\nDATE 04/18/01\\\\nTitle: Vice President, Global Human Resources\\tEX-10.23 5 dex1023.htm COVENANT NOT TO COMPETE AND NON-DISCLOSURE AGREEMENT\\\\nExhibit 10.23\\\\nCOVENANT NOT TO COMPETE\\\\nAND NON-DISCLOSURE AGREEMENT\\\\nPARTIES:\\\\nEric Dean Sprunk (“EMPLOYEE”)\\\\nand\\\\nNIKE, Inc., divisions, subsidiaries\\\\nand affiliates. (“NIKE”):\\\\nRECITALS:\\\\nA. This Covenant Not to Compete and Non-Disclosure Agreement is executed upon initial employment or upon the EMPLOYEE’s\\\\nadvancement with NIKE and is a condition of such employment or advancement.\\\\nB. Over the course of EMPLOYEE’s employment with NIKE, EMPLOYEE will be or has been exposed to and/or is in a position to\\\\ndevelop confidential information peculiar to NIKE’s business and not generally known to the public as defined below (“Protected Information”). It is\\\\nanticipated that EMPLOYEE will continue to be exposed to Protected Information of greater sensitivity as EMPLOYEE advances in the company.\\\\nC. The nature of NIKE’s business is highly competitive and disclosure of any Protected Information would result in severe damage to NIKE\\\\nand be difficult to measure.\\\\nD. NIKE makes use of its Protected Information throughout the world. Protected Information of NIKE can be used to NIKE’s detriment\\\\nanywhere in the world.\\\\nAGREEMENT:\\\\nIn consideration of the foregoing, and the terms and conditions set forth below, the parties agree as follows:\\\\n1. Covenant Not to Compete.\\\\n(a) Competition Restriction. During EMPLOYEE’s employment by NIKE, under the terms of any employment contract or\\\\notherwise, and for one year thereafter, (the “Restriction Period”), EMPLOYEE will not directly or indirectly, own, manage, control, or participate in\\\\nthe ownership,\\\\nmanagement or control of, or be employed by, consult for, or be connected in any manner with, any business engaged anywhere in the world in the\\\\nathletic footwear, athletic apparel or sports equipment and accessories business, or any other business which directly competes with NIKE or any of\\\\nits parent, subsidiaries or affiliated corporations ( “Competitor”). By way of illustration only, examples of NIKE competitors include, but are not\\\\nlimited to: Adidas, FILA, Reebok, Puma, Champion, Oakley, DKNY, Converse, Asics, Saucony, New Balance, Ralph Lauren/Polo Sport, B.U.M,\\\\nFUBU, The Gap, Tommy Hilfiger, Umbro, Northface, Venator (Foot lockers), Sports Authority, Columbia Sportswear, Wilson, Mizuno, Callaway\\\\nGolf and Titleist. This provision is subject to NIKE’s option to waive all or any portion of the Restriction Period as more specifically provided\\\\nbelow.\\\\n(b) Extension of Time. In the event EMPLOYEE breaches this covenant not to compete, the Restriction Period shall automatically\\\\ntoll from the date of the first breach, and all subsequent breaches, until the resolution of the breach through private settlement, judicial or other\\\\naction, including all appeals. The Restriction Period shall continue upon the effective date of any such settlement judicial or other resolution. NIKE\\\\nshall not be obligated to pay EMPLOYEE the additional compensation described in paragraph 1(d) below during any period of time in which this\\\\nAgreement is tolled due to EMPLOYEE’s breach. In the event EMPLOYEE receives such additional compensation after any such breach,\\\\nEMPLOYEE must immediately reimburse NIKE in the amount of all such compensation upon the receipt of a written request by NIKE.\\\\n(c) Waiver of Non-Compete. NIKE has the option, in its sole discretion, to elect to waive all or a portion of the Restriction Period or\\\\nto limit the definition of Competitor, by giving EMPLOYEE seven (7) days prior notice of such election. In the event all or a portion of the\\\\nRestriction Period is waived, NIKE shall not be obligated to pay EMPLOYEE for any period of time as to which the covenant not to compete has\\\\nbeen waived.\\\\n(d) Additional Consideration. As additional consideration for the covenant not to compete described above, should NIKE terminate\\\\nEMPLOYEE’s employment and elect to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly payment equal to one\\\\nhundred percent (100%) of EMPLOYEE’s last monthly base salary while the Restriction Period is in effect. If EMPLOYEE voluntarily terminates\\\\nemployment and NIKE elects to enforce the non-competition agreement, NIKE shall pay EMPLOYEE a monthly severance payment equal to fifty\\\\npercent (50%) of EMPLOYEE’s last monthly base salary while the Restriction Period is in effect. The first payment to EMPLOYEE of additional\\\\nconsideration shall follow on the next applicable pay period after the election to enforce the non-competition agreement, payable in accordance with\\\\nNIKE’s payroll practices.\\\\n2. Subsequent Employer. EMPLOYEE agrees to notify NIKE at the time of separation of employment of the name of EMPLOYEE’s new\\\\nemployer, if known. EMPLOYEE further agrees to disclose to NIKE the name of any subsequent employer during the Restriction Period, wherever\\\\nlocated and regardless of whether such employer is a competitor of NIKE.\\\\n3. Non-Disclosure Agreement.\\\\n(a) Protected Information Defined. “Protected Information” shall mean all proprietary information, in whatever form and format, of\\\\nNIKE and all information provided to NIKE by third parties which NIKE is obligated to keep confidential. EMPLOYEE agrees that any and all\\\\ninformation to which EMPLOYEE has access concerning NIKE projects and internal NIKE information is Protected Information, whether in verbal\\\\nform, machine-readable form, written or other tangible form, and whether designated as confidential or unmarked. Without limiting the foregoing,\\\\nProtected Information includes information relating to NIKE’s research and development activities, its intellectual property and the filing or\\\\npendency of patent applications, confidential techniques, methods, styles, designs, design concepts and ideas, customer and vendor lists, contract\\\\nfactory lists, pricing information, manufacturing plans, business and marketing plans, sales information, methods of operation, manufacturing\\\\nprocesses and methods, products, and personnel information.\\\\n(b) Excluded Information. Notwithstanding paragraph 3(a), Protected Information excludes any information that is or becomes part\\\\nof the public domain through no act or failure to act on the part of EMPLOYEE. Specifically, employees shall be permitted to retain as part of their\\\\npersonal portfolio copies of the employees’ original artwork and designs, provided the artwork or designs have become part of the public domain. In\\\\nany dispute between the parties with respect to this exclusion, the burden of proof will be on EMPLOYEE and such proof will be by clear and\\\\nconvincing evidence.\\\\n(c) Employee’s Obligations. During the period of employment by NIKE and for a period of two (2) years thereafter, EMPLOYEE\\\\nwill hold in confidence and protect all Protected Information and will not, at any time, directly or indirectly, use any Protected Information for any\\\\npurpose outside the scope of EMPLOYEE’s employment with NIKE or disclose any Protected Information to any third person or organization\\\\nwithout the prior written consent of NIKE. Specifically, but not by way of limitation, EMPLOYEE will not ever copy, transmit, reproduce,\\\\nsummarize, quote, publish or make any commercial or other use whatsoever of any Protected Information without the prior written consent of NIKE.\\\\nEMPLOYEE will also take reasonable security precautions and such other actions as may be necessary to insure that there is no use or disclosure,\\\\nintentional or inadvertent, of Protected Information in violation of this Agreement.\\\\n4. Return of Protected Information. At the request of NIKE at anytime, and in any event, upon termination of employment, EMPLOYEE\\\\nshall immediately return to NIKE all confidential documents, including tapes, notebooks, drawings, computer disks and other similar repositories of\\\\nor containing Protected Information, and all copies thereof, then in EMPLOYEE’s possession or under EMPLOYEE’s control.\\\\n5. Unauthorized Use. During the period of employment with NIKE and thereafter, EMPLOYEE will notify NIKE immediately if\\\\nEMPLOYEE becomes aware of the unauthorized possession, use or knowledge of any Protected Information by any person employed or not\\\\nemployed by NIKE at the time of such possession, use or knowledge. EMPLOYEE will cooperate with NIKE in the investigation of any such\\\\nincident and will cooperate with NIKE in any litigation with third parties deemed necessary by NIKE to protect the Protected Information. NIKE\\\\nshall provide reasonable reimbursement to EMPLOYEE for each hour so engaged and that amount shall not be diminished by operation of any\\\\npayment under Paragraph 1(d) of this Agreement.\\\\n6. Non-Recruitment. During the term of this Agreement and for a period of one (1) year thereafter, EMPLOYEE will not directly or\\\\nindirectly , solicit, divert or hire away (or attempt to solicit, divert or hire away) to or for himself or any other company or business organization, any\\\\nNIKE employee, whether or not such employee is a full-time employee or temporary employee and whether or not such employment is pursuant to a\\\\nwritten agreement or is at will.\\\\n7. Accounting of Profits. EMPLOYEE agrees that, if EMPLOYEE should violate any term of this Agreement, NIKE shall be entitled to an\\\\naccounting and repayment of all profits, compensation, commissions, remuneration or benefits which EMPLOYEE directly or indirectly has realized\\\\nand/or may realize as a result of or in connection with any such violation (including the return of any additional consideration paid by NIKE\\\\npursuant to Paragraph 1(d) above). Such remedy shall be in addition to and not in limitation of any injunctive relief or other rights or remedies to\\\\nwhich NIKE may be entitled at law or in equity.\\\\n8. General Provisions.\\\\n(a) Survival. This Agreement shall continue in effect after the termination of EMPLOYEE’s employment, regardless of the reason for\\\\ntermination.\\\\n(b) Waiver. No waiver, amendment, modification or cancellation of any term or condition of this Agreement will be effective unless\\\\nexecuted in writing by both parties. No written waiver will excuse the performance of any act other than the act or acts specifically referred to\\\\ntherein.\\\\n(c) Severability. Each provision herein will be treated as a separate and independent clause and unenforceability of any one clause\\\\nwill in no way impact the enforceability of any other clause. Should any of the provisions in this Agreement be found to be unreasonable or invalid\\\\nby a court of competent jurisdiction, such provision will be enforceable to the maximum extent enforceable by the law of that jurisdiction.\\\\n(d) Applicable Law/Jurisdiction. This Agreement, and EMPLOYEE’s employment hereunder, shall be construed according to the\\\\nlaws of the State of Oregon. EMPLOYEE further hereby submits to the jurisdiction of, and agrees that exclusive jurisdiction over and venue for any\\\\naction or proceeding arising out of or relating to this Agreement shall lie in the state and federal courts located in Oregon.\\\\nEMPLOYEE\\\\nNIKE, Inc.\\\\n/s/ Eric Dean Sprunk\\\\nBy\\\\n/s/ Jeffrey M. Cava\\\\nDATE 04/18/01\\\\nName:\\\\nTitle:\\\\nJeffrey M. Cava\\\\nVice President, Global Human Resources\\n'" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "NDAs[0]" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/main.py b/main.py index d689262..6b23e6e 100644 --- a/main.py +++ b/main.py @@ -1,123 +1,19 @@ -import lzma -import re - -months = {'01': 'January', '02': 'February', '03': 'March', - '04': 'April', '05': 'May', '06': 'June', - '07': 'July', '08': 'August', '09': 'September', - '10': 'October', '11': 'November', '12': 'December'} - - -def dayToWord(day): - day = int(day) - if day > 3: - return str(day) + 'th' - elif day == 3: - return str(day) + 'rd' - elif day == 2 : - return str(day) + 'nd' - else: return str(day) + 'st' - -def numToWord(number): - number = int(number) - d = {1 : 'one', 2 : 'two', 3 : 'three', 4 : 'four', 5 : 'five', - 6 : 'six', 7 : 'seven', 8 : 'eight', 9 : 'nine', 10 : 'ten', - 11 : 'eleven', 12 : 'twelve', 13 : 'thirteen', 14 : 'fourteen', - 15 : 'fifteen', 16 : 'sixteen', 17 : 'seventeen', 18 : 'eighteen', - 19 : 'nineteen', 20 : 'twenty', - 30 : 'thirty', 40 : 'forty', 50 : 'fifty', 60 : 'sixty', - 70 : 'seventy', 80 : 'eighty', 90 : 'ninety' } - if number < 20: - return d[number] - else: - if number % 10 == 0: return d[number] - else: return d[number // 10 * 10] + '-' + d[number % 10] - -def labelJurisdiction(text, jurisdiction): - jurisdictions = [] - for match in re.finditer(jurisdiction, text): - tup = (match.start(), match.end(), 'JURISDICTION') - jurisdictions.append(tup) - return jurisdictions - -def labelEffectiveDate(text, date): - dates = [] - year, month, day = date.split('-') - - dateFormats = [month + '/' + day + '/' + year, - month + '/' + day + '/' + year[-2:], - month[1] + '/' + day + '/' + year, - month[1] + '/' + day[1] + '/' + year, - month[1] + '/' + day + '/' + year[-2:], - month[1] + '/' + day[1] + '/' + year[-2:], - dayToWord(day) + ' of ' + months[month] + ', ' + year, - dayToWord(day) + ' day of ' + months[month] + ', ' + year, - months[month] + ' ' + day + ', ' + year ] - - for format in dateFormats: - for match in re.finditer(format, text, flags=re.IGNORECASE): - tup = (match.start(), match.end(), 'EFFECTIVE_DATE') - dates.append(tup) - - return dates - -def labelParties(text, party): - parties = [] - if 'Inc' in party: - regular = '' - for word in party.split('_'): - regular += word + '(.*)' - party = regular - party = party.replace('_', ' ') - for match in re.finditer(party, text, flags=re.IGNORECASE): - tup = (match.start(), match.end(), 'PARTY') - parties.append(tup) - return parties - -def labelTerms(text, term): - terms = [] - term = term.split('_') - number = numToWord(term[0]) - units = term[1] - for match in re.finditer(number + ' ' + units, text, flags=re.IGNORECASE): - tup = (match.start(), match.end(), 'TERM') - terms.append(tup) - return terms - - -if __name__ == '__main__': - # Read NDAs with lzma - NDAs = [] - with lzma.open('train/in.tsv.xz') as f: - for line in f: - NDAs.append(line.decode('utf-8')) - - # Read expected information - expected = [] - with open('train/expected.tsv') as f: - for line in f: - expected.append(line.replace('\n', '')) - - # Expected to labeled entities - expectEntities = [] - for expect in expected: - entities = [] - for e in expect: - label, entity = e.split('=') - entities.append((label, entity)) - expectEntities.append(entities) - - - # Training data for Spacy - trainData =[] - for i in range(len(expectEntities)): - listOfEntities = [] - for entity in expectEntities[i]: - if entity[0] == 'effective_date': - listOfEntities.append(labelEffectiveDate(NDAs[i], entity[1])) - elif entity[0] == 'jurisdiction': - listOfEntities.append(labelJurisdiction(NDAs[i], entity[1])) - elif entity[0] == 'party': - listOfEntities.append(labelParties(NDAs[i], entity[1])) - else: listOfEntities.append(labelTerms(NDAs[i], entity[1])) - listOfEntities = [item for sublist in listOfEntities for item in sublist] - trainData.append((NDAs[i], {'entities': listOfEntities})) \ No newline at end of file +import lzma +import spacy + + +def readInput(dir): + NDAs = [] + with lzma.open(dir) as f: + for line in f: + NDAs.append(line.decode('utf-8')) + return NDAs + + +if __name__ == '__main__': + NDAs = readInput('train/in.tsv.xz') + + ner = spacy.load('NER') + + for nda in NDAs: + print('pass') \ No newline at end of file