From ef9861bcdcfb1b0d35673d72dccbcb15fb1541ca Mon Sep 17 00:00:00 2001 From: James Hatfield Date: Sat, 28 Sep 2024 01:59:00 -0400 Subject: [PATCH] 1. Addresses issue #94 to use the new official abbreviations 2. Uses word boundaries to only highlight complete words when highlighting duplicates 3. Does not highlight stop words --- README.md | 11 + js/main.js | 542 +++++++++++++++++++++++++++++++++++++- src/BulletApp.js | 10 +- src/const/defaults.js | 586 ++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 1109 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 6b4a8ad..10d2655 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,17 @@ I have no plans to shut down or increase/decrease my level of support for the si Thank you all for the support over the past few years! +## How to run this code + +Install NPM per your OS-specific guidance found here: https://nodejs.org/en/download/package-manager + +run 'npm run build' +cd into the build directory, then serve the files via an HTTP server + +If testing on Windows, these commands will do for testing (use a better server for production): + +'npm run build; cd build; python -m http.server'; then browse to http://localhost:8000 + ## pdf analysis of air force forms One of the most pointless and time-consuming things that Air Force officer and enlisted personnel do every year is bullet-writing. diff --git a/js/main.js b/js/main.js index fada957..729b254 100644 --- a/js/main.js +++ b/js/main.js @@ -5,27 +5,545 @@ const initialText = '- This is a custom built bullet writing tool; abbreviations const tableData = [{ enabled: true, - value: 'abbreviations', - abbr: 'abbrs', + value: 'Airman Basic', + abbr: 'AB', },{ enabled: true, - value: 'table', - abbr: 'tbl', + value: 'Airman', + abbr: 'Amn', },{ enabled: true, - value: 'optimize', - abbr: 'optim', + value: 'Airman First Class', + abbr: 'A1C', },{ enabled: true, - value: 'with ', - abbr: 'w/', + value: 'Senior Airman', + abbr: 'SrA', },{ - enabled: true, - value: 'parentheses', - abbr: 'parens', + enabled: true, + value: 'Staff Sergeant', + abbr: 'SSgt', + },{ + enabled: true, + value: 'Technical Sergeant', + abbr: 'TSgt', + },{ + enabled: true, + value: 'Master Sergeant', + abbr: 'MSgt', + },{ + enabled: true, + value: 'Senior Master Sergeant', + abbr: 'SMSgt', + },{ + enabled: true, + value: 'Senior Master Sergeant', + abbr: 'SMSgt', + },{ + enabled: true, + value: 'Chief Master Sergeant', + abbr: 'CMSgt', + },{ + enabled: true, + value: 'Command Chief Master Sergeant', + abbr: 'CCM', + },{ + enabled: true, + value: 'Second Lieutenant', + abbr: '2d Lt', + },{ + enabled: true, + value: 'First Lieutenant', + abbr: '1st Lt', + },{ + enabled: true, + value: 'Captain', + abbr: 'Capt', + },{ + enabled: true, + value: 'Major', + abbr: 'Maj', + },{ + enabled: true, + value: 'Lieutenant Colonel', + abbr: 'Lt Col', + },{ + enabled: true, + value: 'Colonel', + abbr: 'Col', + },{ + enabled: true, + value: 'Brigadier General', + abbr: 'Brig Gen', + },{ + enabled: true, + value: 'Major General', + abbr: 'Maj Gen', + },{ + enabled: true, + value: 'Lieutenant General', + abbr: 'Lt Gen', + },{ + enabled: true, + value: 'General', + abbr: 'Gen', + },{ + enabled: true, + value: 'AIR BATTLE MANAGER', + abbr: 'ABM', + },{ + enabled: true, + value: 'AGILE COMBAT EMPLOYMENT', + abbr: 'ACE', + },{ + enabled: true, + value: 'ACTIVE DUTY', + abbr: 'AD', + },{ + enabled: true, + value: 'ADMINISTRATIVE CONTROL', + abbr: 'ADCON', + },{ + enabled: true, + value: 'AIRCREW FLIGHT EQUIPMENT', + abbr: 'AFE', + },{ + enabled: true, + value: 'AIR FORCE GENERATION', + abbr: 'AFFORGEN', + },{ + enabled: true, + value: 'AIR FORCE INSTRUCTION', + abbr: 'AFI', + },{ + enabled: true, + value: 'AIR FORCE MANUAL', + abbr: 'AFMAN', + },{ + enabled: true, + value: 'AIR FORCE SPECIALTY CODE', + abbr: 'AFSC', + },{ + enabled: true, + value: 'AIR FORCE SMART OPERATIONS FOR THE 21ST CENTURY', + abbr: 'AFSO21', + },{ + enabled: true, + value: 'AEROSPACE GROUND EQUIPMENT', + abbr: 'AGE', + },{ + enabled: true, + value: 'ARTIFICIAL INTELLIGENCE', + abbr: 'AI', + },{ + enabled: true, + value: 'AIRMAN LEADERSHIP QUALITY', + abbr: 'ALQ', + },{ + enabled: true, + value: 'AIRMAN LEADERSHIP SCHOOL', + abbr: 'ALS', + },{ + enabled: true, + value: 'AREA OF RESPONSIBILITY', + abbr: 'AOR', + },{ + enabled: true, + value: 'APPROPRIATED FUNDS', + abbr: 'APF', + },{ + enabled: true, + value: 'AIR RESERVE TECHNICIAN', + abbr: 'ART', + },{ + enabled: true, + value: 'ANNUAL TOUR', + abbr: 'AT', + },{ + enabled: true, + value: 'AIR TASKING ORDER', + abbr: 'ATO', + },{ + enabled: true, + value: 'BASIC MILITARY TRAINING', + abbr: 'BMT', + },{ + enabled: true, + value: 'BY NAME REQUEST', + abbr: 'BNR', + },{ + enabled: true, + value: 'COMMAND AND CONTROL', + abbr: 'C2', + },{ + enabled: true, + value: 'COMMAND, CONTROL, COMMUNICATIONS, COMPUTERS, INTELLIGENCE, SURVEILLANCE AND RECONNAISSANCE', + abbr: 'C4ISR', + },{ + enabled: true, + value: 'COMBINED AIR OPERATIONS CENTER', + abbr: 'CAOC', + },{ + enabled: true, + value: 'CLOSE AIR SUPPORT', + abbr: 'CAS', + },{ + enabled: true, + value: 'CRISIS ACTION TEAM', + abbr: 'CAT', + },{ + enabled: true, + value: 'COMBAT ARMS TRAINING AND MAINTENANCE', + abbr: 'CATM', + },{ + enabled: true, + value: 'CHEMICAL, BIOLOGICAL, RADIOLOGICAL, NUCLEAR', + abbr: 'CBRN', + },{ + enabled: true, + value: 'COMPUTER BASED TRAINING', + abbr: 'CBT', + },{ + enabled: true, + value: 'COMMANDER\'S INSPECTION PROGRAM', + abbr: 'CCIP', + },{ + enabled: true, + value: 'COMMANDER DIRECTED INVESTIGATION', + abbr: 'CDI', + },{ + enabled: true, + value: 'CHIEF MASTER SERGEANT LEADERSHIP ACADEMY', + abbr: 'CLA', + },{ + enabled: true, + value: 'CHIEF MASTER SERGEANT LEADERSHIP COURSE', + abbr: 'CLC', + },{ + enabled: true, + value: 'COURSE OF ACTION', + abbr: 'COA', + },{ + enabled: true, + value: 'CONGRESSIONAL DELEGATION', + abbr: 'CODEL', + },{ + enabled: true, + value: 'COUNTER INSURGENCY', + abbr: 'COIN', + },{ + enabled: true, + value: 'CONCEPT OF OPERATIONS', + abbr: 'CONOPS', + },{ + enabled: true, + value: 'CONTINENTAL UNITED STATES', + abbr: 'CONUS', + },{ + enabled: true, + value: 'CONTINUITY OF OPERATIONS', + abbr: 'COOP', + },{ + enabled: true, + value: 'COMBAT SEARCH AND RESCUE', + abbr: 'CSAR', + },{ + enabled: true, + value: 'DEFENSE EQUAL OPPORTUNITY CLIMATE SURVEY', + abbr: 'DEOCS', + },{ + enabled: true, + value: 'DINING FACILITY', + abbr: 'DFAC', + },{ + enabled: true, + value: 'DISTINGUISHED GRADUATE', + abbr: 'DG', + },{ + enabled: true, + value: 'DISTINGUISHED VISITOR', + abbr: 'DV', + },{ + enabled: true, + value: 'ENEMY KILLED IN ACTION', + abbr: 'EKIA', + },{ + enabled: true, + value: 'EMERGENCY OPERATIONS CENTER', + abbr: 'EOC', + },{ + enabled: true, + value: 'EXPLOSIVE ORDNANCE DISPOSAL', + abbr: 'EOD', + },{ + enabled: true, + value: 'END OF YEAR', + abbr: 'EOY', + },{ + enabled: true, + value: 'ENLISTED PERFORMANCE REPORT', + abbr: 'EPR', + },{ + enabled: true, + value: 'ELECTRONIC WARFARE', + abbr: 'EW', + },{ + enabled: true, + value: 'FUNCTIONAL AREA MANAGER', + abbr: 'FAM', + },{ + enabled: true, + value: 'FLYING HOUR PROGRAM', + abbr: 'FHP', + },{ + enabled: true, + value: 'FULLY MISSION CAPABLE', + abbr: 'FMC', + },{ + enabled: true, + value: 'FORWARD OPERATING BASE', + abbr: 'FOB', + },{ + enabled: true, + value: 'FULL OPERATIONAL CAPABILITY', + abbr: 'FOC', + },{ + enabled: true, + value: 'FORWARD OPERATING LOCATION', + abbr: 'FOL', + },{ + enabled: true, + value: 'FORCE PROTECTION CONDITIONS', + abbr: 'FPCON', + },{ + enabled: true, + value: 'FIRST TERM AIRMEN CENTER', + abbr: 'FTAC', + },{ + enabled: true, + value: 'FORMAL TRAINING UNIT', + abbr: 'FTU', + },{ + enabled: true, + value: 'GOVERNMENT PURCHASE CARD', + abbr: 'GPC', + },{ + enabled: true, + value: 'GEOGRAPHICALLY SEPARATED UNIT', + abbr: 'GSU', + },{ + enabled: true, + value: 'GOVERNMENT TRAVEL CARD', + abbr: 'GTC', + },{ + enabled: true, + value: 'INACTIVE DUTY FOR TRAINING', + abbr: 'IADT', + },{ + enabled: true, + value: 'INTERMEDIATE DEVELOPMENTAL EDUCATION', + abbr: 'IDE', + },{ + enabled: true, + value: 'IMPROVISED EXPLOSIVE DEVICE', + abbr: 'IED', + },{ + enabled: true, + value: 'INDIVIDUAL MOBILIZATION AUGMENTEE', + abbr: 'IMA', + },{ + enabled: true, + value: 'INITIAL OPERATIONAL CAPABILITY', + abbr: 'IOC', + },{ + enabled: true, + value: 'INSTRUCTOR PILOT', + abbr: 'IP', + },{ + enabled: true, + value: 'INTELLIGENCE, SURVEILLANCE, AND RECONNAISSANCE', + abbr: 'ISR', + },{ + enabled: true, + value: 'INFORMATION TECHNOLOGY', + abbr: 'IT', + },{ + enabled: true, + value: 'JOINT ALL DOMAIN COMMAND AND CONTROL', + abbr: 'JADC2', + },{ + enabled: true, + value: 'JUNIOR RESERVE OFFICER TRAINING CORPS', + abbr: 'JROTC', + },{ + enabled: true, + value: 'KILLED IN ACTION', + abbr: 'KIA', + },{ + enabled: true, + value: 'LINE OF EFFORT', + abbr: 'LOE', + },{ + enabled: true, + value: 'MILITARY CONSTRUCTION', + abbr: 'MILCON', + },{ + enabled: true, + value: 'MEMORANDUM OF AGREEMENT', + abbr: 'MOA', + },{ + enabled: true, + value: 'MEMORANDUM OF UNDERSTANDING', + abbr: 'MOU', + },{ + enabled: true, + value: 'MULTI-CAPABLE AIRMEN', + abbr: 'MCA', + },{ + enabled: true, + value: 'NONAPPROPRIATED FUNDS', + abbr: 'NAF', + },{ + enabled: true, + value: 'NONCOMMISSIONED OFFICER ACADEMY', + abbr: 'NCOA', + },{ + enabled: true, + value: 'NATIONAL CAPITAL REGION', + abbr: 'NCR', + },{ + enabled: true, + value: 'NATIONAL DEFENSE AUTHORIZATION ACT', + abbr: 'NDAA', + },{ + enabled: true, + value: 'NATIONAL DEFENSE STRATEGY', + abbr: 'NDS', + },{ + enabled: true, + value: 'NONCOMBATANT EVACUATION OPERATION', + abbr: 'NEO', + },{ + enabled: true, + value: 'NON-SECURE INTERNET PROTOCOL ROUTER', + abbr: 'NIPR', + },{ + enabled: true, + value: 'NON MISSION CAPABLE', + abbr: 'NMC', + },{ + enabled: true, + value: 'OPERATIONS AND MAINTENANCE', + abbr: 'O&M', + enabled: true, + value: 'OVERSEAS CONTINGENCY OPERATIONS', + abbr: 'OCO', + },{ + enabled: true, + value: 'OUTSIDE CONTINENTAL UNITED STATES', + abbr: 'OCONUS', + },{ + enabled: true, + value: 'ON THE JOB TRAINING', + abbr: 'OJT', + },{ + enabled: true, + value: 'OPERATIONS PLAN', + abbr: 'OPLAN', + },{ + enabled: true, + value: 'PRIMARY DEVELOPMENTAL EDUCATION', + abbr: 'PDE', + },{ + enabled: true, + value: 'PROFESSIONAL MILITARY EDUCATION', + abbr: 'PME', + },{ + enabled: true, + value: 'POINT OF CONTACT', + abbr: 'POC', + },{ + enabled: true, + value: 'PHYSICAL TRAINING', + abbr: 'PT', + },{ + enabled: true, + value: 'QUALITY ASSURANCE', + abbr: 'QA', + },{ + enabled: true, + value: 'QUALITY OF LIFE', + abbr: 'QoL', + },{ + enabled: true, + value: 'RULES OF ENGAGEMENT', + abbr: 'ROE', + },{ + enabled: true, + value: 'RESERVE OFFICER TRAINING CORPS', + abbr: 'ROTC', + },{ + enabled: true, + value: 'SEXUAL ASSAULT PREVENTION AND RESPONSE', + abbr: 'SAPR', + },{ + enabled: true, + value: 'SENIOR DEVELOPMENTAL EDUCATION', + abbr: 'SDE', + },{ + enabled: true, + value: 'SUBJECT MATTER EXPERT', + abbr: 'SME', + },{ + enabled: true, + value: 'SENIOR NONCOMMISSIONED OFFICER ACADEMY', + abbr: 'SNCOA', + },{ + enabled: true, + value: 'STANDARD OPERATING PROCEDURE', + abbr: 'SOP', + },{ + enabled: true, + value: 'SQUADRON OFFICER SCHOOL', + abbr: 'SOS', + },{ + enabled: true, + value: 'SCIENCE, TECHNOLOGY, ENGINEERING, AND MATHEMATICS', + abbr: 'STEM', + },{ + enabled: true, + value: 'TEMPORARY DUTY', + abbr: 'TDY', + },{ + enabled: true, + value: 'TOTAL FORCE INTEGRATION', + abbr: 'TFI', + },{ + enabled: true, + value: 'TRADITIONAL RESERVIST', + abbr: 'TR', + },{ + enabled: true, + value: 'TOP SECRET', + abbr: 'TS', + },{ + enabled: true, + value: 'UNIT COMPLIANCE INSPECTION', + abbr: 'UCI', + },{ + enabled: true, + value: 'UNIFORM CODE OF MILITARY JUSTICE', + abbr: 'UCMJ', + },{ + enabled: true, + value: 'UNIT EFFECTIVENESS INSPECTION', + abbr: 'UEI', + },{ + enabled: true, + value: 'EXPEDITIONARY AIRBASE', + abbr: 'XAB', }, ]; - const tableSettings = { columns: [{ data: 'enabled', diff --git a/src/BulletApp.js b/src/BulletApp.js index dc73879..413bb79 100644 --- a/src/BulletApp.js +++ b/src/BulletApp.js @@ -8,7 +8,7 @@ import { tokenize } from "./components/Bullets/utils"; import AbbreviationViewer from "./components/Abbreviation/AbbreviationViewer"; import SynonymViewer from "./components/Toolbars/Thesaurus.js"; import { EditorState, ContentState, Modifier, SelectionState, CompositeDecorator } from "draft-js"; -import { defaultAbbrData, defaultText, defaultWidth } from "./const/defaults"; +import { defaultAbbrData, defaultText, defaultWidth, stopWords } from "./const/defaults"; const defaultEditorState = EditorState.createWithContent( ContentState.createFromText(defaultText) @@ -186,9 +186,13 @@ function BulletApp({enableHighlight, onHighlightChange}) { function findWithRegex(duplicates, contentBlock, callback) { const text = contentBlock.getText(); + const duplicatesMinusStopWords = new Set(duplicates).difference(stopWords); - duplicates.forEach(word => { - const matches = [...text.matchAll(word)]; + duplicatesMinusStopWords.forEach(word => { + // TODO Apply word boundaries here + // use global (g) and case insensitive (i) match + let re = new RegExp(String.raw`\s${word}\s`, "gi"); + const matches = [...text.matchAll(re)]; matches.forEach(match => callback(match.index, match.index + match[0].length) ); diff --git a/src/const/defaults.js b/src/const/defaults.js index 0351c01..cb611d9 100644 --- a/src/const/defaults.js +++ b/src/const/defaults.js @@ -4,30 +4,566 @@ export const defaultText = - Click the thesaurus button to show one; select a word in this or the output box to view synonyms--words in parentheses are abbreviations that are configured"; export const defaultWidth = 202.321; -export const defaultAbbrData = [ - { - enabled: true, - value: "abbreviations", - abbr: "abbrs", - }, - { - enabled: true, - value: "table", - abbr: "tbl", - }, - { - enabled: true, - value: "optimize", - abbr: "optim", - }, - { - enabled: true, - value: "with ", - abbr: "w/", - }, - { - enabled: true, - value: "parentheses", - abbr: "parens", +export const defaultAbbrData = [{ + enabled: true, + value: 'Airman Basic', + abbr: 'AB', + },{ + enabled: true, + value: 'Airman', + abbr: 'Amn', + },{ + enabled: true, + value: 'Airman First Class', + abbr: 'A1C', + },{ + enabled: true, + value: 'Senior Airman', + abbr: 'SrA', + },{ + enabled: true, + value: 'Staff Sergeant', + abbr: 'SSgt', + },{ + enabled: true, + value: 'Technical Sergeant', + abbr: 'TSgt', + },{ + enabled: true, + value: 'Master Sergeant', + abbr: 'MSgt', + },{ + enabled: true, + value: 'Senior Master Sergeant', + abbr: 'SMSgt', + },{ + enabled: true, + value: 'Senior Master Sergeant', + abbr: 'SMSgt', + },{ + enabled: true, + value: 'Chief Master Sergeant', + abbr: 'CMSgt', + },{ + enabled: true, + value: 'Command Chief Master Sergeant', + abbr: 'CCM', + },{ + enabled: true, + value: 'Second Lieutenant', + abbr: '2d Lt', + },{ + enabled: true, + value: 'First Lieutenant', + abbr: '1st Lt', + },{ + enabled: true, + value: 'Captain', + abbr: 'Capt', + },{ + enabled: true, + value: 'Major', + abbr: 'Maj', + },{ + enabled: true, + value: 'Lieutenant Colonel', + abbr: 'Lt Col', + },{ + enabled: true, + value: 'Colonel', + abbr: 'Col', + },{ + enabled: true, + value: 'Brigadier General', + abbr: 'Brig Gen', + },{ + enabled: true, + value: 'Major General', + abbr: 'Maj Gen', + },{ + enabled: true, + value: 'Lieutenant General', + abbr: 'Lt Gen', + },{ + enabled: true, + value: 'General', + abbr: 'Gen', + },{ + enabled: true, + value: 'AIR BATTLE MANAGER', + abbr: 'ABM', + },{ + enabled: true, + value: 'AGILE COMBAT EMPLOYMENT', + abbr: 'ACE', + },{ + enabled: true, + value: 'ACTIVE DUTY', + abbr: 'AD', + },{ + enabled: true, + value: 'ADMINISTRATIVE CONTROL', + abbr: 'ADCON', + },{ + enabled: true, + value: 'AIRCREW FLIGHT EQUIPMENT', + abbr: 'AFE', + },{ + enabled: true, + value: 'AIR FORCE GENERATION', + abbr: 'AFFORGEN', + },{ + enabled: true, + value: 'AIR FORCE INSTRUCTION', + abbr: 'AFI', + },{ + enabled: true, + value: 'AIR FORCE MANUAL', + abbr: 'AFMAN', + },{ + enabled: true, + value: 'AIR FORCE SPECIALTY CODE', + abbr: 'AFSC', + },{ + enabled: true, + value: 'AIR FORCE SMART OPERATIONS FOR THE 21ST CENTURY', + abbr: 'AFSO21', + },{ + enabled: true, + value: 'AEROSPACE GROUND EQUIPMENT', + abbr: 'AGE', + },{ + enabled: true, + value: 'ARTIFICIAL INTELLIGENCE', + abbr: 'AI', + },{ + enabled: true, + value: 'AIRMAN LEADERSHIP QUALITY', + abbr: 'ALQ', + },{ + enabled: true, + value: 'AIRMAN LEADERSHIP SCHOOL', + abbr: 'ALS', + },{ + enabled: true, + value: 'AREA OF RESPONSIBILITY', + abbr: 'AOR', + },{ + enabled: true, + value: 'APPROPRIATED FUNDS', + abbr: 'APF', + },{ + enabled: true, + value: 'AIR RESERVE TECHNICIAN', + abbr: 'ART', + },{ + enabled: true, + value: 'ANNUAL TOUR', + abbr: 'AT', + },{ + enabled: true, + value: 'AIR TASKING ORDER', + abbr: 'ATO', + },{ + enabled: true, + value: 'BASIC MILITARY TRAINING', + abbr: 'BMT', + },{ + enabled: true, + value: 'BY NAME REQUEST', + abbr: 'BNR', + },{ + enabled: true, + value: 'COMMAND AND CONTROL', + abbr: 'C2', + },{ + enabled: true, + value: 'COMMAND, CONTROL, COMMUNICATIONS, COMPUTERS, INTELLIGENCE, SURVEILLANCE AND RECONNAISSANCE', + abbr: 'C4ISR', + },{ + enabled: true, + value: 'COMBINED AIR OPERATIONS CENTER', + abbr: 'CAOC', + },{ + enabled: true, + value: 'CLOSE AIR SUPPORT', + abbr: 'CAS', + },{ + enabled: true, + value: 'CRISIS ACTION TEAM', + abbr: 'CAT', + },{ + enabled: true, + value: 'COMBAT ARMS TRAINING AND MAINTENANCE', + abbr: 'CATM', + },{ + enabled: true, + value: 'CHEMICAL, BIOLOGICAL, RADIOLOGICAL, NUCLEAR', + abbr: 'CBRN', + },{ + enabled: true, + value: 'COMPUTER BASED TRAINING', + abbr: 'CBT', + },{ + enabled: true, + value: 'COMMANDER\'S INSPECTION PROGRAM', + abbr: 'CCIP', + },{ + enabled: true, + value: 'COMMANDER DIRECTED INVESTIGATION', + abbr: 'CDI', + },{ + enabled: true, + value: 'CHIEF MASTER SERGEANT LEADERSHIP ACADEMY', + abbr: 'CLA', + },{ + enabled: true, + value: 'CHIEF MASTER SERGEANT LEADERSHIP COURSE', + abbr: 'CLC', + },{ + enabled: true, + value: 'COURSE OF ACTION', + abbr: 'COA', + },{ + enabled: true, + value: 'CONGRESSIONAL DELEGATION', + abbr: 'CODEL', + },{ + enabled: true, + value: 'COUNTER INSURGENCY', + abbr: 'COIN', + },{ + enabled: true, + value: 'CONCEPT OF OPERATIONS', + abbr: 'CONOPS', + },{ + enabled: true, + value: 'CONTINENTAL UNITED STATES', + abbr: 'CONUS', + },{ + enabled: true, + value: 'CONTINUITY OF OPERATIONS', + abbr: 'COOP', + },{ + enabled: true, + value: 'COMBAT SEARCH AND RESCUE', + abbr: 'CSAR', + },{ + enabled: true, + value: 'DEFENSE EQUAL OPPORTUNITY CLIMATE SURVEY', + abbr: 'DEOCS', + },{ + enabled: true, + value: 'DINING FACILITY', + abbr: 'DFAC', + },{ + enabled: true, + value: 'DISTINGUISHED GRADUATE', + abbr: 'DG', + },{ + enabled: true, + value: 'DISTINGUISHED VISITOR', + abbr: 'DV', + },{ + enabled: true, + value: 'ENEMY KILLED IN ACTION', + abbr: 'EKIA', + },{ + enabled: true, + value: 'EMERGENCY OPERATIONS CENTER', + abbr: 'EOC', + },{ + enabled: true, + value: 'EXPLOSIVE ORDNANCE DISPOSAL', + abbr: 'EOD', + },{ + enabled: true, + value: 'END OF YEAR', + abbr: 'EOY', + },{ + enabled: true, + value: 'ENLISTED PERFORMANCE REPORT', + abbr: 'EPR', + },{ + enabled: true, + value: 'ELECTRONIC WARFARE', + abbr: 'EW', + },{ + enabled: true, + value: 'FUNCTIONAL AREA MANAGER', + abbr: 'FAM', + },{ + enabled: true, + value: 'FLYING HOUR PROGRAM', + abbr: 'FHP', + },{ + enabled: true, + value: 'FULLY MISSION CAPABLE', + abbr: 'FMC', + },{ + enabled: true, + value: 'FORWARD OPERATING BASE', + abbr: 'FOB', + },{ + enabled: true, + value: 'FULL OPERATIONAL CAPABILITY', + abbr: 'FOC', + },{ + enabled: true, + value: 'FORWARD OPERATING LOCATION', + abbr: 'FOL', + },{ + enabled: true, + value: 'FORCE PROTECTION CONDITIONS', + abbr: 'FPCON', + },{ + enabled: true, + value: 'FIRST TERM AIRMEN CENTER', + abbr: 'FTAC', + },{ + enabled: true, + value: 'FORMAL TRAINING UNIT', + abbr: 'FTU', + },{ + enabled: true, + value: 'GOVERNMENT PURCHASE CARD', + abbr: 'GPC', + },{ + enabled: true, + value: 'GEOGRAPHICALLY SEPARATED UNIT', + abbr: 'GSU', + },{ + enabled: true, + value: 'GOVERNMENT TRAVEL CARD', + abbr: 'GTC', + },{ + enabled: true, + value: 'INACTIVE DUTY FOR TRAINING', + abbr: 'IADT', + },{ + enabled: true, + value: 'INTERMEDIATE DEVELOPMENTAL EDUCATION', + abbr: 'IDE', + },{ + enabled: true, + value: 'IMPROVISED EXPLOSIVE DEVICE', + abbr: 'IED', + },{ + enabled: true, + value: 'INDIVIDUAL MOBILIZATION AUGMENTEE', + abbr: 'IMA', + },{ + enabled: true, + value: 'INITIAL OPERATIONAL CAPABILITY', + abbr: 'IOC', + },{ + enabled: true, + value: 'INSTRUCTOR PILOT', + abbr: 'IP', + },{ + enabled: true, + value: 'INTELLIGENCE, SURVEILLANCE, AND RECONNAISSANCE', + abbr: 'ISR', + },{ + enabled: true, + value: 'INFORMATION TECHNOLOGY', + abbr: 'IT', + },{ + enabled: true, + value: 'JOINT ALL DOMAIN COMMAND AND CONTROL', + abbr: 'JADC2', + },{ + enabled: true, + value: 'JUNIOR RESERVE OFFICER TRAINING CORPS', + abbr: 'JROTC', + },{ + enabled: true, + value: 'KILLED IN ACTION', + abbr: 'KIA', + },{ + enabled: true, + value: 'LINE OF EFFORT', + abbr: 'LOE', + },{ + enabled: true, + value: 'MILITARY CONSTRUCTION', + abbr: 'MILCON', + },{ + enabled: true, + value: 'MEMORANDUM OF AGREEMENT', + abbr: 'MOA', + },{ + enabled: true, + value: 'MEMORANDUM OF UNDERSTANDING', + abbr: 'MOU', + },{ + enabled: true, + value: 'MULTI-CAPABLE AIRMEN', + abbr: 'MCA', + },{ + enabled: true, + value: 'NONAPPROPRIATED FUNDS', + abbr: 'NAF', + },{ + enabled: true, + value: 'NONCOMMISSIONED OFFICER ACADEMY', + abbr: 'NCOA', + },{ + enabled: true, + value: 'NATIONAL CAPITAL REGION', + abbr: 'NCR', + },{ + enabled: true, + value: 'NATIONAL DEFENSE AUTHORIZATION ACT', + abbr: 'NDAA', + },{ + enabled: true, + value: 'NATIONAL DEFENSE STRATEGY', + abbr: 'NDS', + },{ + enabled: true, + value: 'NONCOMBATANT EVACUATION OPERATION', + abbr: 'NEO', + },{ + enabled: true, + value: 'NON-SECURE INTERNET PROTOCOL ROUTER', + abbr: 'NIPR', + },{ + enabled: true, + value: 'NON MISSION CAPABLE', + abbr: 'NMC', + },{ + enabled: true, + value: 'OPERATIONS AND MAINTENANCE', + abbr: 'O&M', + enabled: true, + value: 'OVERSEAS CONTINGENCY OPERATIONS', + abbr: 'OCO', + },{ + enabled: true, + value: 'OUTSIDE CONTINENTAL UNITED STATES', + abbr: 'OCONUS', + },{ + enabled: true, + value: 'ON THE JOB TRAINING', + abbr: 'OJT', + },{ + enabled: true, + value: 'OPERATIONS PLAN', + abbr: 'OPLAN', + },{ + enabled: true, + value: 'PRIMARY DEVELOPMENTAL EDUCATION', + abbr: 'PDE', + },{ + enabled: true, + value: 'PROFESSIONAL MILITARY EDUCATION', + abbr: 'PME', + },{ + enabled: true, + value: 'POINT OF CONTACT', + abbr: 'POC', + },{ + enabled: true, + value: 'PHYSICAL TRAINING', + abbr: 'PT', + },{ + enabled: true, + value: 'QUALITY ASSURANCE', + abbr: 'QA', + },{ + enabled: true, + value: 'QUALITY OF LIFE', + abbr: 'QoL', + },{ + enabled: true, + value: 'RULES OF ENGAGEMENT', + abbr: 'ROE', + },{ + enabled: true, + value: 'RESERVE OFFICER TRAINING CORPS', + abbr: 'ROTC', + },{ + enabled: true, + value: 'SEXUAL ASSAULT PREVENTION AND RESPONSE', + abbr: 'SAPR', + },{ + enabled: true, + value: 'SENIOR DEVELOPMENTAL EDUCATION', + abbr: 'SDE', + },{ + enabled: true, + value: 'SUBJECT MATTER EXPERT', + abbr: 'SME', + },{ + enabled: true, + value: 'SENIOR NONCOMMISSIONED OFFICER ACADEMY', + abbr: 'SNCOA', + },{ + enabled: true, + value: 'STANDARD OPERATING PROCEDURE', + abbr: 'SOP', + },{ + enabled: true, + value: 'SQUADRON OFFICER SCHOOL', + abbr: 'SOS', + },{ + enabled: true, + value: 'SCIENCE, TECHNOLOGY, ENGINEERING, AND MATHEMATICS', + abbr: 'STEM', + },{ + enabled: true, + value: 'TEMPORARY DUTY', + abbr: 'TDY', + },{ + enabled: true, + value: 'TOTAL FORCE INTEGRATION', + abbr: 'TFI', + },{ + enabled: true, + value: 'TRADITIONAL RESERVIST', + abbr: 'TR', + },{ + enabled: true, + value: 'TOP SECRET', + abbr: 'TS', + },{ + enabled: true, + value: 'UNIT COMPLIANCE INSPECTION', + abbr: 'UCI', + },{ + enabled: true, + value: 'UNIFORM CODE OF MILITARY JUSTICE', + abbr: 'UCMJ', + },{ + enabled: true, + value: 'UNIT EFFECTIVENESS INSPECTION', + abbr: 'UEI', + },{ + enabled: true, + value: 'EXPEDITIONARY AIRBASE', + abbr: 'XAB', }, ]; + +export const stopWords = new Set([ + "a", "about", "above", "after", "again", "against", "all", "am", "an", "and", + "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", + "below", "between", "both", "but", "by", "can't", "cannot", "could", "couldn't", + "did", "didn't", "do", "does", "doesn't", "doing", "don't", "down", "during", + "each", "few", "for", "from", "further", "had", "hadn't", "has", "hasn't", "have", + "haven't", "having", "he", "he'd", "he'll", "he's", "her", "here", "here's", + "hers", "herself", "him", "himself", "his", "how", "how's", "i", "i'd", "i'll", + "i'm", "i've", "if", "in", "into", "is", "isn't", "it", "it's", "its", "itself", + "just", "know", "let", "let's", "like", "me", "might", "mightn't", "more", "most", + "must", "mustn't", "my", "myself", "no", "nor", "not", "of", "off", "on", "once", + "only", "or", "other", "our", "ours", "ourselves", "out", "over", "own", "s", + "same", "she", "she'd", "she'll", "she's", "should", "shouldn't", "so", "some", + "such", "t", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", + "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", + "this", "those", "through", "to", "too", "under", "until", "up", "ve", "very", + "was", "wasn't", "we", "we'd", "we'll", "we're", "we've", "were", "weren't", "what", + "what's", "when", "where", "where's", "which", "while", "who", "who's", "whom", + "why", "why's", "will", "with", "won't", "would", "wouldn't", "you", "you'd", + "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves" +]); \ No newline at end of file