From 27c9818aa669cc0512c55a78fd0fa2c8f0feb13f Mon Sep 17 00:00:00 2001 From: Emiliano Heyns Date: Wed, 9 Aug 2023 13:43:10 +0200 Subject: [PATCH] sentence-case (#26) --- test/data/sentenceCase.json | 773 ++++++++++++++++++++++++++++++++++++ test/tests/utilitiesTest.js | 11 + utilities.js | 59 +++ 3 files changed, 843 insertions(+) create mode 100644 test/data/sentenceCase.json diff --git a/test/data/sentenceCase.json b/test/data/sentenceCase.json new file mode 100644 index 0000000..d1bcfbd --- /dev/null +++ b/test/data/sentenceCase.json @@ -0,0 +1,773 @@ +{ + "Erratum: “Analyzing the Growth of InₓGa₁₋ₓN/GaN Superlattices in Self-Induced GaN Nanowires by x-Ray Diffraction”": "Erratum: “analyzing the growth of InₓGa₁₋ₓN/GaN superlattices in self-induced GaN nanowires by x-ray diffraction”", + "Erratum: Analyzing the Growth of InxGa1xN/GaN Superlattices in Self-Induced GaN Nanowires by X-Ray Diffraction": "Erratum: analyzing the growth of InxGa1xN/GaN superlattices in self-induced GaN nanowires by X-ray diffraction", + "Chapter 3. Putting Ideas into Your Own Words and Paragraphs": "Chapter 3. Putting ideas into your own words and paragraphs", + "Structured Interviewing for OCB: Construct Validity, Faking, and the Effects of Question Type": "Structured interviewing for OCB: construct validity, faking, and the effects of question type", + "Type B Personality: A Meta-Analysis": "Type B personality: a meta-analysis", + "insight: A Unified Interface to Access Information from Model Objects in R": "insight: a unified interface to access information from model objects in R", + "Proceedings of the Symposium on Artificial Intelligence and Programming Languages": "Proceedings of the symposium on artificial intelligence and programming languages", + "Migration and the Origins of Homo sapiens": "Migration and the origins of Homo sapiens", + "Proceedings of the International Conference on Software Engineering": "Proceedings of the international conference on software engineering", + "The Application of Theorem Proving to Question Answering": "The application of theorem proving to question answering", + "Proceedings of the Fall Joint Computer Conference": "Proceedings of the fall joint computer conference", + "Machine Intelligence": "Machine intelligence", + "Theoretical Issues in Reading Comprehension: Perspectives from Cognitive Science, Linguistics, Artificial Intelligence and Education": "Theoretical issues in reading comprehension: perspectives from cognitive science, linguistics, artificial intelligence and education", + "The Use of Equality in Deduction and Knowledge Representation": "The use of equality in deduction and knowledge representation", + "AAAI-91": "AAAI-91", + "Systematic Nonlinear Planning": "Systematic nonlinear planning", + "Partial Order Backtracking": "Partial order backtracking", + "IJCAI-75": "IJCAI-75", + "IJCAI-73": "IJCAI-73", + "Scripts, Plans, Goals, and Understanding": "Scripts, plans, goals, and understanding", + "Language and Memory": "Language and memory", + "Computational Semantics: An Introduction to Artificial Intelligence and Natural Language Comprehension": "Computational semantics: an introduction to artificial intelligence and natural language comprehension", + "Parsing English II": "Parsing english II", + "Theoretical Issues in Natural Language Processing": "Theoretical issues in natural language processing", + "The Psychology of Computer Vision": "The psychology of computer vision", + "Dependency Networks as a Representation for Modeling in General Problem Solvers": "Dependency networks as a representation for modeling in general problem solvers", + "Automatic Construction of Algorithms and Data Structures Using a Knowledge Base of Programming Rules": "Automatic construction of algorithms and data structures using a knowledge base of programming rules", + "Computer-Based Medical Consultations: MYCIN": "Computer-based medical consultations: MYCIN", + "Problem Solving Methods in Artificial Intelligence": "Problem solving methods in artificial intelligence", + "Understanding Natural Language": "Understanding natural language", + "MACLISP Reference Manual": "MACLISP reference manual", + "Description and Theoretical Analysis of PLANNER: A Language for Proving Theorems and Manipulating Models in a Robot": "Description and theoretical analysis of PLANNER: a language for proving theorems and manipulating models in a robot", + "Open Information System Semantics for Distributed Artificial Intelligence": "Open information system semantics for distributed artificial intelligence", + "Micro-Planner Reference Manual": "Micro-planner reference manual", + "NETL: A System for Representing and Using Real-World Knowledge": "NETL: a system for representing and using real-world knowledge", + "GPS: A Case Study in Generality and Problem Solving": "GPS: a case study in generality and problem solving", + "Proceeding of the Symposium on Artificial Intelligence and Programming Languages": "Proceeding of the symposium on artificial intelligence and programming languages", + "IJCAI-77": "IJCAI-77", + "Understanding Goal-based Stories": "Understanding goal-based stories", + "Integrated Processing in Planning and Understanding": "Integrated processing in planning and understanding", + "COLING-90": "COLING-90", + "A Critical Evaluation of Commensurable Abductive Models for Semantic Interpretation": "A critical evaluation of commensurable abductive models for semantic interpretation", + "Non-disjunctive Ambiguity": "Non-disjunctive ambiguity", + "Script Application: Computer Understanding of Newspaper Stories": "Script application: computer understanding of newspaper stories", + "The Process of Question Answering": "The process of question answering", + "Hypothesis Formation and Evaluation in Medical Diagnosis": "Hypothesis formation and evaluation in medical diagnosis", + "Production Planning, Scheduling, and Inventory Control": "Production planning, scheduling, and inventory control", + "Analysing Mathematical Proofs (Or Reading between the Lines)": "Analysing mathematical proofs (or reading between the lines)", + "The Syntax and Semantics of Complex Nominals": "The syntax and semantics of complex nominals", + "Gothenburg Studies in English": "Gothenburg studies in english", + "Semantic Patterns of Noun-Noun Compound": "Semantic patterns of noun-noun compound", + "Research in Natural Language Understanding: Quarterly Technical Progress Report No. 1,1": "Research in natural language understanding: quarterly technical progress report no. 1,1", + "A Theory of Syntactic Recognition for Natural Language": "A theory of syntactic recognition for natural language", + "The FRL Manual": "The FRL manual", + "Universals in Linguistic Theory": "Universals in linguistic theory", + "Semantic Interpretation in Generative Grammar": "Semantic interpretation in generative grammar", + "Translation of English into MAPL Using Winograd's Syntax, State Transition Networks, and a Semantic Case Grammar": "Translation of english into MAPL using winograd's syntax, state transition networks, and a semantic case grammar", + "ACL-87": "ACL-87", + "Some Chart-based Techniques for Parsing Ill-formed Input": "Some chart-based techniques for parsing ill-formed input", + "Computers and Thought": "Computers and thought", + "Lisp Machine Manual": "Lisp machine manual", + "Syntax and Semantics 8: Grammatical Relations": "Syntax and semantics 8: grammatical relations", + "Computer Models of Thought and Language": "Computer models of thought and language", + "Computer System Architecture": "Computer system architecture", + "Instrumental With/ and the Control Relation in English": "Instrumental with/ and the control relation in english", + "Natural Language Processing": "Natural language processing", + "Computational understanding": "Computational understanding", + "Linguistic Theory and Psychological Reality": "Linguistic theory and psychological reality", + "FRANZ LISP ... The Manual": "FRANZ LISP ... The manual", + "Phrase Structure Rules for Parsifal": "Phrase structure rules for parsifal", + "Studies in the Perception of Language": "Studies in the perception of language", + "Visual Information Processing": "Visual information processing", + "Proceedings of the AISB Summer Conference": "Proceedings of the AISB summer conference", + "Principles of Artificial Intelligence": "Principles of artificial intelligence", + "Introduction to Montague Semantics": "Introduction to montague semantics", + "Mapping Input onto Schemas": "Mapping input onto schemas", + "Memory, Meaning, and Syntax": "Memory, meaning, and syntax", + "Strategies for Natural Language Processing": "Strategies for natural language processing", + "Beyond Question Answering": "Beyond question answering", + "Teamwork": "Teamwork", + "Conceptual Information Processing": "Conceptual information processing", + "Conceptual memory": "Conceptual memory", + "Towards a Computational Theory of Definite Anaphora Comprehension in English Discourse": "Towards a computational theory of definite anaphora comprehension in english discourse", + "Focusing in the Comprehension of Definite Anaphora": "Focusing in the comprehension of definite anaphora", + "IJCAI-81": "IJCAI-81", + "Workshop on the Evaluation of Natural Language Processing Systems": "Workshop on the evaluation of natural language processing systems", + "Adaptive Understanding: Correcting Erroneous Inferences": "Adaptive understanding: correcting erroneous inferences", + "Methods and Tactics in Cognitive Science": "Methods and tactics in cognitive science", + "Generalization and Memory in an Integrated Understanding System": "Generalization and memory in an integrated understanding system", + "Approaches to Natural Language": "Approaches to natural language", + "On the Unification of Language Comprehension with Problem Solving": "On the unification of language comprehension with problem solving", + "Machine Intelligence 3": "Machine intelligence 3", + "Syntactic Structures": "Syntactic structures", + "Aspects of the Theory of Syntax": "Aspects of the theory of syntax", + "Syntactic Argumentation and the Structure of English": "Syntactic argumentation and the structure of english", + "Syntactic Theory": "Syntactic theory", + "Beginning English Grammar": "Beginning english grammar", + "Naive Physics I: Ontology for Liquids": "Naive physics I: ontology for liquids", + "How to Do Things with Words": "How to do things with words", + "Speech Acts: An Essay in the Philosophy of Language": "Speech acts: an essay in the philosophy of language", + "The Intentionality of Intention and Action": "The intentionality of intention and action", + "Syntax and Semantics 3: Speech acts": "Syntax and semantics 3: speech acts", + "Conversational postulates": "Conversational postulates", + "Artificial Intelligence in Medicine": "Artificial intelligence in medicine", + "Semantic Memory": "Semantic memory", + "Syntax and Semantics 13: Current Approaches to Syntax": "Syntax and semantics 13: current approaches to syntax", + "Learning and Relearning in Boltzmann Machines": "Learning and relearning in boltzmann machines", + "History of LISP": "History of LISP", + "Machines Who Think": "Machines who think", + "Faster Than Thought": "Faster than thought", + "Part of Chapter 25": "Part of chapter 25", + "Philosophical Investigations": "Philosophical investigations", + "The Linguistic Turn: Recent Essays in Philosophical Method": "The linguistic turn: recent essays in philosophical method", + "Principia Mathematica": "Principia mathematica", + "Chess Skill in Man and Machine": "Chess skill in man and machine", + "CHESS 4.5 - the Northwestern University chess program": "CHESS 4.5 - the northwestern university chess program", + "Language, Memory, and Thought": "Language, memory, and thought", + "A Transformational Approach to English Syntax: Root, Structure-preserving, and Local Transformations": "A transformational approach to english syntax: root, structure-preserving, and local transformations", + "A Recognition Procedure for Transformational Grammars": "A recognition procedure for transformational grammars", + "Flexible parsing": "Flexible parsing", + "Bolt Beranek and Newman": "Bolt beranek and newman", + "The RUS System": "The RUS system", + "The Mental Representation of Grammatical Relations": "The mental representation of grammatical relations", + "An Introduction to KL-ONE": "An introduction to KL-ONE", + "AAAI-82": "AAAI-82", + "Toward a Mathematical Theory of Plan Synthesis": "Toward a mathematical theory of plan synthesis", + "Extending Conventional Planning Techniques to Handle Actions with Context-dependent effects": "Extending conventional planning techniques to handle actions with context-dependent effects", + "Proceedings of the 1976 National Computer Conference": "Proceedings of the 1976 national computer conference", + "Computational Linguistics in Medicine": "Computational linguistics in medicine", + "Language as a Cognitive Process, Volume I: Syntax": "Language as a cognitive process, volume I: syntax", + "Knowledge and Cognition": "Knowledge and cognition", + "How can Merlin understand?": "How can merlin understand?", + "Speech Acts": "Speech acts", + "Syntax and Semantics": "Syntax and semantics", + "Conversational coherency": "Conversational coherency", + "Understanding Spoken language": "Understanding spoken language", + "Discourse knowledge": "Discourse knowledge", + "Attention, Intention and the Structure of Discourse": "Attention, intention and the structure of discourse", + "The Representation and Use of Focus in a System for Understanding Dialogs": "The representation and use of focus in a system for understanding dialogs", + "Collaborative Systems": "Collaborative systems", + "Language and Machines: Computers in Translation and Linguistics": "Language and machines: computers in translation and linguistics", + "Algorithms": "Algorithms", + "Artificial Intelligence and Natural Man": "Artificial intelligence and natural man", + "Artificial Intelligence": "Artificial intelligence", + "LISP 1.5 Primer": "LISP 1.5 primer", + "Let's Talk LISP": "Let's talk LISP", + "Techniques of Artificial Intelligence": "Techniques of artificial intelligence", + "Finite State Morphology: A review of Koskenniemi (1983)": "Finite state morphology: a review of koskenniemi (1983)", + "Proc. AAAI": "Proc. AAAI", + "A Comparative Study of Computer-Aided Clinical Diagnosis of Birth Defects": "A comparative study of computer-aided clinical diagnosis of birth defects", + "Reasoning from Incomplete Knowledge in a Procedural Deduction System": "Reasoning from incomplete knowledge in a procedural deduction system", + "ACM Symposium on Theoretical Computer Science": "ACM symposium on theoretical computer science", + "Proceedings of the Symposium on Text Processing": "Proceedings of the symposium on text processing", + "Introduction to Logic": "Introduction to logic", + "Introduction to Mathematical Logic": "Introduction to mathematical logic", + "An Episodic Knowledge Representation for Narrative Texts": "An episodic knowledge representation for narrative texts", + "Knowledge Representation and Defeasible Reasoning": "Knowledge representation and defeasible reasoning", + "Frankenstein": "Frankenstein", + "Pattern Directed Inference Systems": "Pattern directed inference systems", + "Expert Systems in the Microelectronic Age": "Expert systems in the microelectronic age", + "R1: The formative years": "R1: the formative years", + "A Process Model of Language Acquisition": "A process model of language acquisition", + "Computation and Language Acquisition": "Computation and language acquisition", + "Locality Principles and the Acquisition of Syntactic Knowledge": "Locality principles and the acquisition of syntactic knowledge", + "Psychology and Language": "Psychology and language", + "Representation and Description of Curved Objects": "Representation and description of curved objects", + "Machine Learning: An Artificial Intelligence Approach": "Machine learning: an artificial intelligence approach", + "Computer Vision": "Computer vision", + "Computer Vision Systems": "Computer vision systems", + "Computational vision": "Computational vision", + "Organization and Representation in Perception": "Organization and representation in perception", + "Textural segmentation": "Textural segmentation", + "Computer backgammon": "Computer backgammon", + "IEEE Conference on Systems and Control": "IEEE conference on systems and control", + "Unskolemizing": "Unskolemizing", + "A Computational Logic": "A computational logic", + "A Robust Layered Control System for a Mobile Robot": "A robust layered control system for a mobile robot", + "AAAI-88": "AAAI-88", + "Situated Vision in a Dynamic World: Chasing Objects": "Situated vision in a dynamic world: chasing objects", + "Intelligence without Representation": "Intelligence without representation", + "A Study of Thinking": "A study of thinking", + "Proceedings of the 5th Conference on Automated Deduction": "Proceedings of the 5th conference on automated deduction", + "Control Systems for Technicians": "Control systems for technicians", + "Pattern-Directed Inference Systems": "Pattern-directed inference systems", + "Brain Mechanisms in Memory and Learning: From the Single Neuron to Man": "Brain mechanisms in memory and learning: from the single neuron to man", + "Proceedings of the International Machine Learning Workshop": "Proceedings of the international machine learning workshop", + "AAAI-83": "AAAI-83", + "Symbolic Logic and Mechanical Theorem Proving": "Symbolic logic and mechanical theorem proving", + "Logic and Databases": "Logic and databases", + "Programming in Prolog": "Programming in prolog", + "On Reverse Skolemization": "On reverse skolemization", + "Representing and Acquiring Geographic Knowledge": "Representing and acquiring geographic knowledge", + "IJCAI-83": "IJCAI-83", + "Knowledge-Based Systems in Artificial Intelligence": "Knowledge-based systems in artificial intelligence", + "Artificial Intelligence: An MIT Perspective": "Artificial intelligence: an MIT perspective", + "Psychology of Learning and Motivation": "Psychology of learning and motivation", + "A Study of Qualitative and Geometric Knowledge in Reasoning about Motion": "A study of qualitative and geometric knowledge in reasoning about motion", + "Automata, Languages, and Programming": "Automata, languages, and programming", + "WHISPER: A Computer Implementation Using Analogues in Reasoning": "WHISPER: a computer implementation using analogues in reasoning", + "Information Processing: Proceedings of the International Conference on Information Processing": "Information processing: proceedings of the international conference on information processing", + "Empirical explorations of SYNCHEM": "Empirical explorations of SYNCHEM", + "The Perception of the Visual World": "The perception of the visual world", + "A Theory of Human Action": "A theory of human action", + "Proceedings of the ACM Symposium on Lisp and Functional Programming": "Proceedings of the ACM symposium on lisp and functional programming", + "PSL: A portable LISP system": "PSL: a portable LISP system", + "Monte Carlo Simulation of Tolerancing in Discrete Parts Manufacturing and Assembly": "Monte carlo simulation of tolerancing in discrete parts manufacturing and assembly", + "The Naive Physics Manifesto": "The naive physics manifesto", + "Liquids": "Liquids", + "Proceedings of the 3rd ACM Symposium on Principles of Programming Languages": "Proceedings of the 3rd ACM symposium on principles of programming languages", + "Foundations of Cyclopean Perception": "Foundations of cyclopean perception", + "Sorting and Searching": "Sorting and searching", + "Computational Problems in Abstract Algebra": "Computational problems in abstract algebra", + "Principles of Gestalt Psychology": "Principles of gestalt psychology", + "AAAI-80": "AAAI-80", + "Multiple-Agent Planning Systems": "Multiple-agent planning systems", + "Machine Intelligence 10": "Machine intelligence 10", + "Proceedings of the IFIP Congress": "Proceedings of the IFIP congress", + "A Proof Procedure Using Connection Graphs": "A proof procedure using connection graphs", + "Logic for Problem Solving": "Logic for problem solving", + "Metaphors We Live By": "Metaphors we live by", + "Memory-Based Parsing": "Memory-based parsing", + "The Nature of Heuristics": "The nature of heuristics", + "Counterfactuals": "Counterfactuals", + "Spatial Planning: A configuration space approach": "Spatial planning: a configuration space approach", + "Introduction to Linear and Nonlinear Programming": "Introduction to linear and nonlinear programming", + "Vision": "Vision", + "Proceedings of the Symposium on the Mechanization of Thought Processes": "Proceedings of the symposium on the mechanization of thought processes", + "Towards a Mathematical Theory of Computation": "Towards a mathematical theory of computation", + "The CONNIVER Reference Manual": "The CONNIVER reference manual", + "Assimilation of New Information by a Natural Language Understanding System": "Assimilation of new information by a natural language understanding system", + "Very Large Planner-Type Data Bases": "Very large planner-type data bases", + "Flexibility and Efficiency in a Computer Program for Designing Circuits": "Flexibility and efficiency in a computer program for designing circuits", + "Non-monotonic logic I": "Non-monotonic logic I", + "Mind design": "Mind design", + "Duck Reference Manual": "Duck reference manual", + "The Nisp manual": "The nisp manual", + "Metric Time Maps": "Metric time maps", + "Formal Theories of the Commonsense World": "Formal theories of the commonsense world", + "A Critique of Pure Reason": "A critique of pure reason", + "Regression Planning": "Regression planning", + "Robot Planning": "Robot planning", + "A Heuristic Estimator for Means-Ends Analysis in Planning": "A heuristic estimator for means-ends analysis in planning", + "PDDL – The Planning Domain Definition Language": "PDDL – the planning domain definition language", + "The 1998 AI Planning Systems Competition": "The 1998 AI planning systems competition", + "Using Active Connection Graphs for Reasoning with Recursive Rules": "Using active connection graphs for reasoning with recursive rules", + "Scheduling Heuristics for Problem Solvers": "Scheduling heuristics for problem solvers", + "Deadlines, Travel Time and Robot Problem Solving": "Deadlines, travel time and robot problem solving", + "Planning by Search Through Simulations": "Planning by search through simulations", + "Semantic Information Processing": "Semantic information processing", + "Formal Philosophy": "Formal philosophy", + "Reasoning about Knowledge and Action": "Reasoning about knowledge and action", + "A Formal Thoery of Knowledge and Action": "A formal thoery of knowledge and action", + "SHOP: Simple Hierarchical Ordered Planner": "SHOP: simple hierarchical ordered planner", + "Technical Report": "Technical report", + "Total-Order Planning with Partially Ordered Subtasks": "Total-order planning with partially ordered subtasks", + "The Shop Planning System": "The shop planning system", + "SHOP2: An HTN Planning System": "SHOP2: an HTN planning system", + "Plane Geometry Theorem Proving Using Forward Chaining": "Plane geometry theorem proving using forward chaining", + "Principles of Interactive Computer Graphics": "Principles of interactive computer graphics", + "Intensity, Visible-Surface, and Volumetric Representations": "Intensity, visible-surface, and volumetric representations", + "Proceedings of the Cambridge Symposium on Optical and Electro-Optical Engineering": "Proceedings of the cambridge symposium on optical and electro-optical engineering", + "Robot Manipulators: Mathematics, Programming, and Control": "Robot manipulators: mathematics, programming, and control", + "Fractal-Based Description": "Fractal-based description", + "Logic Programming": "Logic programming", + "Selective backtracking": "Selective backtracking", + "Machine Intelligence 7": "Machine intelligence 7", + "Machine Intelligence 6": "Machine intelligence 6", + "A Theory of Diagnosis from First Principles": "A theory of diagnosis from first principles", + "A Logical Framework for Depiction and Image Interpretation": "A logical framework for depiction and image interpretation", + "On Inheritance Hierarchies with Exceptions": "On inheritance hierarchies with exceptions", + "Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy, Vladimir Lifschitz (Ed.), Academic Press": "Artificial intelligence and mathematical theory of computation: papers in honor of john McCarthy, vladimir lifschitz (ed.), academic press", + "The Frame Problem in the Situation Calculus: A Simple Solution (Sometimes) and a Completeness Result for Goal Regression": "The frame problem in the situation calculus: a simple solution (sometimes) and a completeness result for goal regression", + "Associative Networks: Representation and Use of Knowledge by Computer": "Associative networks: representation and use of knowledge by computer", + "Knowledge Reorganization and Reasoning Style": "Knowledge reorganization and reasoning style", + "LOGLISP – An alternative to PROLOG": "LOGLISP – an alternative to PROLOG", + "A Structure for Plans and Behavior": "A structure for plans and behavior", + "Re: The Gettysburg Address: Representing social and political acts": "Re: the gettysburg address: representing social and political acts", + "The Computation of Immediate Texture Discrimination": "The computation of immediate texture discrimination", + "Programming a Computer for Playing Chess": "Programming a computer for playing chess", + "Inductive Inference of Theories from Facts": "Inductive inference of theories from facts", + "Directions in Human-Computer Interactions": "Directions in human-computer interactions", + "The Decomposition of a Large Domain: Reasoning about Machines": "The decomposition of a large domain: reasoning about machines", + "An overview of Common LISP": "An overview of common LISP", + "Planning with Constraints": "Planning with constraints", + "Kinematics and Mechanisms Design": "Kinematics and mechanisms design", + "A Computer Model of Skill Acquisition": "A computer model of skill acquisition", + "AML: A manufacturing language": "AML: a manufacturing language", + "Interlisp Reference Manual": "Interlisp reference manual", + "Planning and Understanding": "Planning and understanding", + "Practical Planning": "Practical planning", + "A Multiagent planning architecture": "A multiagent planning architecture", + "Artificial Intelligence: An MIT Perspective, Vol. 2": "Artificial intelligence: an MIT perspective, vol. 2", + "Artificial Intelligence 2nd ed.": "Artificial intelligence 2nd ed.", + "Recovering Surface Shape and Orientation from Texture": "Recovering surface shape and orientation from texture", + "Dynamic Memory: A Theory of Learning in Computers and People": "Dynamic memory: a theory of learning in computers and people", + "Representation and Understanding": "Representation and understanding", + "Decision Analysis: Introductory Lectures on Choices under Uncertainty": "Decision analysis: introductory lectures on choices under uncertainty", + "LISPcraft": "LISPcraft", + "The Structure of Scientific Revolutions": "The structure of scientific revolutions", + "Criticism and the Growth of Knowledge": "Criticism and the growth of knowledge", + "Integrated Marker-Passing and Problem-Solving: A Spreading-Activation Approach to Improved Choice in Planning": "Integrated marker-passing and problem-solving: a spreading-activation approach to improved choice in planning", + "The Semantic Interpretation of Nominal Compounds": "The semantic interpretation of nominal compounds", + "An Adaptive Planner": "An adaptive planner", + "AAAI-87": "AAAI-87", + "Inference in Text Understanding": "Inference in text understanding", + "Unified Theory of Inference for Text Understanding": "Unified theory of inference for text understanding", + "LR parsing": "LR parsing", + "ACL-86": "ACL-86", + "Natural Language Parsing": "Natural language parsing", + "AAAI-86": "AAAI-86", + "The Logic of Persistence": "The logic of persistence", + "A Formal Theory of Plan Recognition": "A formal theory of plan recognition", + "A Circumscriptive Theory of Plan Recognition": "A circumscriptive theory of plan recognition", + "Reasoning About Plans": "Reasoning about plans", + "A Formal Theory of Plan Recognition and its Implementation": "A formal theory of plan recognition and its implementation", + "What is Intention?": "What is intention?", + "Making Computational Sense of Montague's Intensional Logic": "Making computational sense of montague's intensional logic", + "ACL-85": "ACL-85", + "Ontological Promiscuity": "Ontological promiscuity", + "IJCAI-87": "IJCAI-87", + "Local Pragmatics": "Local pragmatics", + "ACL-88": "ACL-88", + "Interpretation as Abduction": "Interpretation as abduction", + "An Introduction to Unification-based Approaches to Grammar": "An introduction to unification-based approaches to grammar", + "Discourse, Anaphora and Parsing": "Discourse, anaphora and parsing", + "Formal Methods in the Study of Language": "Formal methods in the study of language", + "A Theory of Truth and Semantic Representation": "A theory of truth and semantic representation", + "A Prolog-like Inference System for Computing Minimum-cost Abductive Explanations in Natural-language Interpretation": "A prolog-like inference system for computing minimum-cost abductive explanations in natural-language interpretation", + "Anaphora in Natural Language Understanding: A Survey": "Anaphora in natural language understanding: a survey", + "Proceedings of the 21st Annual Meeting of the Association for Computational Linguistics": "Proceedings of the 21st annual meeting of the association for computational linguistics", + "Semantic Interpretation against Ambiguity": "Semantic interpretation against ambiguity", + "Studies in Natural Language Processing": "Studies in natural language processing", + "Semantic Interpretation and the Resolution of Ambiguity": "Semantic interpretation and the resolution of ambiguity", + "Using a Marker-passing to Guide Forward-chaining": "Using a marker-passing to guide forward-chaining", + "Word Sense Disambiguation in Descriptive text interpretation": "Word sense disambiguation in descriptive text interpretation", + "Time and Tense in English": "Time and tense in english", + "AAAI-90": "AAAI-90", + "Incorporating Default Inferences Into Plan Recognition": "Incorporating default inferences into plan recognition", + "ACL-MIT Press Series in Natural Language Processing": "ACL-MIT press series in natural language processing", + "Plan Recognition in Natural Language Dialogue": "Plan recognition in natural language dialogue", + "Proceedings of the AAAI Symposium on Abduction": "Proceedings of the AAAI symposium on abduction", + "A Computational Model of Referring": "A computational model of referring", + "Abductive Speech Act Recognition": "Abductive speech act recognition", + "Working Papers:Navy Tactical Narrative Paragraphs and Glosses": "Working papers:navy tactical narrative paragraphs and glosses", + "CSLI Lecture Notes": "CSLI lecture notes", + "Prolog and Natural-Language Analysis": "Prolog and natural-language analysis", + "Meaning and Speech Acts": "Meaning and speech acts", + "A Domain-independent Algorithm for Plan Adaptation": "A domain-independent algorithm for plan adaptation", + "Structure and Interpretation of Computer Programs": "Structure and interpretation of computer programs", + "Informality in Program Specifications": "Informality in program specifications", + "The Problem of Simplifying Truth Functions": "The problem of simplifying truth functions", + "Minimization of Boolean Functions": "Minimization of boolean functions", + "Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp": "Paradigms of artificial intelligence programming: case studies in common lisp", + "Possible Events, Actual Events, and robots": "Possible events, actual events, and robots", + "A Syntactic Theory of Belief and Action": "A syntactic theory of belief and action", + "The Frame Problem in Artificial Intelligence: Proceedings of the 1987 Workshop": "The frame problem in artificial intelligence: proceedings of the 1987 workshop", + "A Syntactic Approach to Introspection and Reasoning about the Beliefs of other Agents": "A syntactic approach to introspection and reasoning about the beliefs of other agents", + "Proceedings of the Third International Conference on Principles of Knowledge Representation and Reasoning": "Proceedings of the third international conference on principles of knowledge representation and reasoning", + "Knowledge Representation requirements for Description-based Communication": "Knowledge representation requirements for description-based communication", + "Languages with Self-reference I: Foundations": "Languages with self-reference I: foundations", + "Persistence, Intention, and Commitment": "Persistence, intention, and commitment", + "Intention is Choice with Commitment": "Intention is choice with commitment", + "Proceedings of the International Conference on Multi-Agent Systems": "Proceedings of the international conference on multi-agent systems", + "Communicative Actions for Artificial Agents": "Communicative actions for artificial agents", + "A Critical Examination of Allen's Theory of Action and Time": "A critical examination of allen's theory of action and time", + "Explanation-based generalization: A Unifying View": "Explanation-based generalization: a unifying view", + "An Architecture for Intelligent Reactive Systems": "An architecture for intelligent reactive systems", + "Connectionist Networks for Learning Coordinated Motion in Autonomous Systems": "Connectionist networks for learning coordinated motion in autonomous systems", + "IJCAI-89": "IJCAI-89", + "Reference Frames for Animate Vision": "Reference frames for animate vision", + "Generation and Selection of Likely Interpretations during Plan Recognition in Task-oriented Consultation systems": "Generation and selection of likely interpretations during plan recognition in task-oriented consultation systems", + "Overregularization": "Overregularization", + "Occasional Paper": "Occasional paper", + "Knowledge Representation for Supporting Decision Model Formulation in Medicine": "Knowledge representation for supporting decision model formulation in medicine", + "Intention, Plans, and Practical Reason": "Intention, plans, and practical reason", + "Towards a General Theory of Action and Time": "Towards a general theory of action and time", + "A Model for Temporal References and its Application in a Question Answering Program": "A model for temporal references and its application in a question answering program", + "Plans and Social Actions": "Plans and social actions", + "A Representation of Time for Planning, Technical Note 278": "A representation of time for planning, technical note 278", + "Proceedings of IEEE International Conference on Robotics": "Proceedings of IEEE international conference on robotics", + "A Representation of Time for Automatic Planning": "A representation of time for automatic planning", + "Time Map Maintenance": "Time map maintenance", + "Proceedings of IEEE Workshop on Principles of Knowledge-Based Systems": "Proceedings of IEEE workshop on principles of knowledge-based systems", + "Planning and Temporal Reasoning Under Uncertainty": "Planning and temporal reasoning under uncertainty", + "Proceedings of CSCSI 84. Canadian Society for Computational Studies of Intelligence": "Proceedings of CSCSI 84. Canadian society for computational studies of intelligence", + "Managing Time Maps": "Managing time maps", + "A TNMS User's Manual": "A TNMS user's manual", + "IJCAI-85": "IJCAI-85", + "Temporal Reasoning Involving Counterfactuals and Disjunctions": "Temporal reasoning involving counterfactuals and disjunctions", + "Proceedings of the Workshop on Planning and Reasoning About Action": "Proceedings of the workshop on planning and reasoning about action", + "Handling Shared Resources in a Temporal Data Base Management System": "Handling shared resources in a temporal data base management system", + "Proceedings of the Third International ACM Conference on Office Information Systems": "Proceedings of the third international ACM conference on office information systems", + "Decision Support for Coordinated Multi-Agent Planning": "Decision support for coordinated multi-agent planning", + "An Analysis of Time-Dependent Planning": "An analysis of time-dependent planning", + "Reasoning About Partially Ordered Events": "Reasoning about partially ordered events", + "Planning and Control": "Planning and control", + "Planning with Deadlines in Stochastic Domains": "Planning with deadlines in stochastic domains", + "Classifying and Detecting Plan-based Misconceptions for Robust Plan Recognition": "Classifying and detecting plan-based misconceptions for robust plan recognition", + "Deduction as Parsing": "Deduction as parsing", + "Getting Serious about Parsing Plans: A Grammatical Analysis of Plan Recognition": "Getting serious about parsing plans: a grammatical analysis of plan recognition", + "Undecidability of Subsumption in NIKL": "Undecidability of subsumption in NIKL", + "Term Subsumption language in Knowledge representation": "Term subsumption language in knowledge representation", + "Time-derivative Models of Pavlovian Reinforcement": "Time-derivative models of pavlovian reinforcement", + "Learning and Sequential Decision Making": "Learning and sequential decision making", + "Neuronlike Adaptive Elements That Can Solve Difficult Learning Problems": "Neuronlike adaptive elements that can solve difficult learning problems", + "Connectionist Learning for Control: An Overview": "Connectionist learning for control: an overview", + "COINS Technical Report": "COINS technical report", + "Approximate Planning": "Approximate planning", + "Reasoning about Action I: A Possible Worlds Approach": "Reasoning about action I: a possible worlds approach", + "Reasoning about Action II: The Qualification Problem": "Reasoning about action II: the qualification problem", + "Universal Planning: An (Almost) Universally Bad Idea": "Universal planning: an (almost) universally bad idea", + "Dynamic Backtracking": "Dynamic backtracking", + "Reasoning about Actions using a Possible Models Approach": "Reasoning about actions using a possible models approach", + "A Schema-based Approach to Understanding Subjunctive Conditionals": "A schema-based approach to understanding subjunctive conditionals", + "Knowledge Preconditions for Actions and Plans": "Knowledge preconditions for actions and plans", + "Foundations of a Logic of Knowledge, Action, and Communication": "Foundations of a logic of knowledge, action, and communication", + "Features and Fluents": "Features and fluents", + "Logic Based Modelling of Goal-directed Behavior": "Logic based modelling of goal-directed behavior", + "Linköping Electronic Articles in Computer and Information Science": "Linköping electronic articles in computer and information science", + "Computational Complexity and Natural Language": "Computational complexity and natural language", + "Anytime Synthetic Projection: Maximizing the Probability of Goal Satisfaction": "Anytime synthetic projection: maximizing the probability of goal satisfaction", + "Abstract Probabilistic Modeling of Action": "Abstract probabilistic modeling of action", + "UCPOP: A Sound, Complete, Partial Order Planner for ADL": "UCPOP: a sound, complete, partial order planner for ADL", + "UCPOP User's Manual (Version 2.0)": "UCPOP user's manual (version 2.0)", + "STATIC: A Problem-space compiler for PRODIGY": "STATIC: a problem-space compiler for PRODIGY", + "An Approach to Planning with Incomplete Information": "An approach to planning with incomplete information", + "Softbots as Testbeds for Machine Learning": "Softbots as testbeds for machine learning", + "Working Notes, AAAI Spring Symposium on Software Agents": "Working notes, AAAI spring symposium on software agents", + "Building Softbots for UNIX": "Building softbots for UNIX", + "Intelligence without Robots: A Reply to Brooks": "Intelligence without robots: a reply to brooks", + "Tractable Closed World Reasoning with Updates": "Tractable closed world reasoning with updates", + "Intelligent Agents on the Internet: Fact, Fiction, and Forecast": "Intelligent agents on the internet: fact, fiction, and forecast", + "Utility Models for Goal-directed Decision-theoretic Planners": "Utility models for goal-directed decision-theoretic planners", + "Representing Iterative Loops for Decision-theoretic planning": "Representing iterative loops for decision-theoretic planning", + "Answering Queries from Context-Sensitive Probabilistic Knowledge Bases": "Answering queries from context-sensitive probabilistic knowledge bases", + "Efficient Temporal Probabilistic Reasoning Via Context-Sensitive Model Construction": "Efficient temporal probabilistic reasoning via context-sensitive model construction", + "Algorithms, Concurrency and Knowledge (Proceedings ACSC95)": "Algorithms, concurrency and knowledge (proceedings ACSC95)", + "Lecture Notes in Computer Science": "Lecture notes in computer science", + "Probabilistic Logic Programming and Bayesian Networks": "Probabilistic logic programming and bayesian networks", + "Proceedings of the Eleventh Conference on Uncertainty in Artificial Intelligence": "Proceedings of the eleventh conference on uncertainty in artificial intelligence", + "A Theoretical Framework for Context-Sensitive Temporal Probability Model Construction with Application to Plan Projection": "A theoretical framework for context-sensitive temporal probability model construction with application to plan projection", + "Proceedings of the Tenth Conference on Uncertainty in Artificial Intelligence": "Proceedings of the tenth conference on uncertainty in artificial intelligence", + "Generating Bayesian Networks from Probability Logic Knowledge Bases": "Generating bayesian networks from probability logic knowledge bases", + "An Algorithm for Probabilistic Planning": "An algorithm for probabilistic planning", + "Probabilistic Planning with Information Gathering and Contingent Execution": "Probabilistic planning with information gathering and contingent execution", + "Universal Plans for Reactive Robots in Unpredictable Environments": "Universal plans for reactive robots in unpredictable environments", + "Proceedings of the AIAA Conference on Intelligent Robots in Field, Factory, Service and Space": "Proceedings of the AIAA conference on intelligent robots in field, factory, service and space", + "Total Order vs./ Partial Order Planning: Factors Influencing Performance": "Total order vs./ partial order planning: factors influencing performance", + "Total-Order and Partial-Order Planning: A comparative analysis": "Total-order and partial-order planning: a comparative analysis", + "Commitment Strategies in Planning: A Comparative Analysis": "Commitment strategies in planning: a comparative analysis", + "A Study in the Logic of Intention": "A study in the logic of intention", + "Reasoning about Indefinite Actions": "Reasoning about indefinite actions", + "Conditional Nonlinear Planning": "Conditional nonlinear planning", + "An Empirical Study of Sensing and Defaulting in Planning": "An empirical study of sensing and defaulting in planning", + "On the Semantics of STRIPS": "On the semantics of STRIPS", + "Achieving Several goals Simultaneously": "Achieving several goals simultaneously", + "A General Framework for Modal Deduction": "A general framework for modal deduction", + "The Frame Problem and Knowledge-producing Actions": "The frame problem and knowledge-producing actions", + "Logics for Artificial Intelligence": "Logics for artificial intelligence", + "Robot Motion: Planning and Control": "Robot motion: planning and control", + "Compliant Motion": "Compliant motion", + "A Stochastic Model of Actions and Plans for Anytime Planning Under Uncertainty": "A stochastic model of actions and plans for anytime planning under uncertainty", + "The Contract Net Protocol: High-level Communication and Control in a Distributed Problem Solver": "The contract net protocol: high-level communication and control in a distributed problem solver", + "Hierarchical Arc Consistency for Disjoint Real Intervals in Constraint Logic Programming": "Hierarchical arc consistency for disjoint real intervals in constraint logic programming", + "Representation of Activity Knowledge for Project Management": "Representation of activity knowledge for project management", + "A Framework for Knowledge-based Computer-Integrated Manufacturing": "A framework for knowledge-based computer-integrated manufacturing", + "An Efficient Probabilistic Context-free Parsing Algorithm that Computes Prefix Probabilities": "An efficient probabilistic context-free parsing algorithm that computes prefix probabilities", + "X2MORF: A Morphological Component Based on Augmented Two-level Morphology": "X2MORF: a morphological component based on augmented two-level morphology", + "Evidential Probability": "Evidential probability", + "Formal Techniques in Artificial Intelligence": "Formal techniques in artificial intelligence", + "Mechanical Theorem Proving": "Mechanical theorem proving", + "Nondeterministic Lisp as a Substrate for Constraint Logic Programming": "Nondeterministic lisp as a substrate for constraint logic programming", + "Screamer: A Portable Efficient Implementation of Nondeterministic Common Lisp": "Screamer: a portable efficient implementation of nondeterministic common lisp", + "Conditional Existence of Variables in generalized Constraint Networks": "Conditional existence of variables in generalized constraint networks", + "Cassandra: Planning for Contingencies": "Cassandra: planning for contingencies", + "Planning for Contingencies: A Decision-based Approach": "Planning for contingencies: a decision-based approach", + "Opportunities and Planning in an Unpredictable World": "Opportunities and planning in an unpredictable world", + "Hybrid Problems, Hybrid Solutions (Proceedings of AISB-95)": "Hybrid problems, hybrid solutions (proceedings of AISB-95)", + "Planning under uncertainty: Some Key Issues": "Planning under uncertainty: some key issues", + "Temporal Planner = Nonlinear Planner + Time Map Manager": "Temporal planner = nonlinear planner + time map manager", + "Knowledge Interchange Format, Version 3.0 Reference Manual": "Knowledge interchange format, version 3.0 reference manual", + "Logic Group Report": "Logic group report", + "Bias-driven Revision of Logical Domain theories": "Bias-driven revision of logical domain theories", + "Teleo-reactive programs for Agent Control": "Teleo-reactive programs for agent control", + "Generating Conditional Plans and Programs": "Generating conditional plans and programs", + "A Theoretical Evaluation of Selected Backtracking Algorithms": "A theoretical evaluation of selected backtracking algorithms", + "Reasoning about Locations in Theory and Practice": "Reasoning about locations in theory and practice", + "Towards a Content Theory of Loops": "Towards a content theory of loops", + "Reasoning with Constraints within O-Plan2": "Reasoning with constraints within O-Plan2", + "Toward the Development of Flexible Mixed-initiative Scheduling Tools": "Toward the development of flexible mixed-initiative scheduling tools", + "Mixed-initiative Military Planning": "Mixed-initiative military planning", + "A Case Study in Integration of Case-based and Temporal reasoning using CAFE and Tachyon": "A case study in integration of case-based and temporal reasoning using CAFE and tachyon", + "Machine Learning of Planning Knowledge for SOCAP": "Machine learning of planning knowledge for SOCAP", + "Mixed-initiative planning: An Open Information Systems Approach": "Mixed-initiative planning: an open information systems approach", + "Mixed-initiative planning in O-Plan2": "Mixed-initiative planning in O-Plan2", + "Handbook of Evaluation for the ARPA/Rome Lab Planning Initiative": "Handbook of evaluation for the ARPA/rome lab planning initiative", + "Planning for Conjunctive Goals": "Planning for conjunctive goals", + "Distributional Clustering of English Words": "Distributional clustering of english words", + "Enterprise: A Market-like Task Scheduler for Distributed Computing Environments": "Enterprise: a market-like task scheduler for distributed computing environments", + "Incentive Engineering for Computational Resource Management": "Incentive engineering for computational resource management", + "Markets and Computation: Agoric Open Systems": "Markets and computation: agoric open systems", + "Situated Modeling of Epistemic Puzzles": "Situated modeling of epistemic puzzles", + "Spawn: A distributed Computational Economy": "Spawn: a distributed computational economy", + "A Microeconomic Approach to Optimal Resource Allocation in Distributed Computer Systems": "A microeconomic approach to optimal resource allocation in distributed computer systems", + "On Planning While Learning": "On planning while learning", + "Learning the Past Tense of English Verbs: The Symbolic Pattern Associator vs. Connectionist Models": "Learning the past tense of english verbs: the symbolic pattern associator vs. Connectionist models", + "Integrated Planning for Automated Image Processing": "Integrated planning for automated image processing", + "Making an Impact: Artificial Intelligence at the Jet Propulsion Laboratory": "Making an impact: artificial intelligence at the jet propulsion laboratory", + "The Collage/Khoros link: Planning for Image Processing Tasks": "The collage/khoros link: planning for image processing tasks", + "Localized Planning with Diversified Plan Construction Methods": "Localized planning with diversified plan construction methods", + "Provably Bounded-Optimal Agents": "Provably bounded-optimal agents", + "Using Pivot Consistency to Decompose and Solve Functional CSPs": "Using pivot consistency to decompose and solve functional CSPs", + "Hybrid Planning for Partially Hierarchical Domains": "Hybrid planning for partially hierarchical domains", + "Reviving Partial Order Planning.": "Reviving partial order planning.", + "Planning with External Events": "Planning with external events", + "The Logic of Time": "The logic of time", + "IJCAI Workshop on Agent Theories, Archietectures and Languages": "IJCAI workshop on agent theories, archietectures and languages", + "Foundations of a Logical Approach to Agent Programming": "Foundations of a logical approach to agent programming", + "UMCP: A Sound and Complete Procedure for Hierarchical Task Network Planning": "UMCP: a sound and complete procedure for hierarchical task network planning", + "HTN Planning: Complexity and Expressivity": "HTN planning: complexity and expressivity", + "Semantics for Hierarchical Task-Network Planning": "Semantics for hierarchical task-network planning", + "Partial Order Planning: Evaluating Possible Efficiency Gains": "Partial order planning: evaluating possible efficiency gains", + "The Uses of Plans": "The uses of plans", + "An Investigation in Reactive Planning in Complex Domains": "An investigation in reactive planning in complex domains", + "A New Logical Framework for Deductive Planning": "A new logical framework for deductive planning", + "Deduction-Based Refinement Planning": "Deduction-based refinement planning", + "The Hazards of Fancy Backtracking": "The hazards of fancy backtracking", + "Limited Discrepancy Search": "Limited discrepancy search", + "On the Synthesis of Situation Control Rules under Exogenous Events": "On the synthesis of situation control rules under exogenous events", + "Planning Control Rules for Reactive Agents": "Planning control rules for reactive agents", + "An Efficient Reactive Planner for Synthesizing Reactive Plans": "An efficient reactive planner for synthesizing reactive plans", + "Synthesizing Plant Controllers Using Real-time Goals": "Synthesizing plant controllers using real-time goals", + "Proceedings of the Sixth Conference on Artificial Intelligence Application": "Proceedings of the sixth conference on artificial intelligence application", + "Real-Time Reasoning: The Monitoring and Control of Spacecraft Systems": "Real-time reasoning: the monitoring and control of spacecraft systems", + "An Architecture for Real-Time Reasoning and System Control": "An architecture for real-time reasoning and system control", + "Procedural Knowledge": "Procedural knowledge", + "Propice-Plan: Toward a Unified Framework for Planning and Execution": "Propice-plan: toward a unified framework for planning and execution", + "A Hierarchy of Tractable Subsets for Computing Stable Models": "A hierarchy of tractable subsets for computing stable models", + "A Translation Approach to Portable Ontology Specifications": "A translation approach to portable ontology specifications", + "Toward Principles for the Design of Ontologies Used for Knowledge Sharing": "Toward principles for the design of ontologies used for knowledge sharing", + "Accelerating Partial-order Planners: Some techniques for Effective Search Control and Pruning": "Accelerating partial-order planners: some techniques for effective search control and pruning", + "On Partially-controlled Multi-agent Systems": "On partially-controlled multi-agent systems", + "Adaptive Problem-solving for Large-Scale Scheduling Problems: A Case Study": "Adaptive problem-solving for large-scale scheduling problems: a case study", + "PHI — A Logic-based Tool for Intelligent Help Systems": "PHI — a logic-based tool for intelligent help systems", + "Prodigy Planning Algorithm": "Prodigy planning algorithm", + "Abstraction and Approximate Decision-theoretic planning": "Abstraction and approximate decision-theoretic planning", + "Refinement Search as a Unifying Framework for Analyzing Planning Algorithms": "Refinement search as a unifying framework for analyzing planning algorithms", + "A Representation for Efficient Planning in Dynamic Domains with External Events": "A representation for efficient planning in dynamic domains with external events", + "CIRCA: A Cooperative Intelligent Real-Time Control Architecture": "CIRCA: a cooperative intelligent real-time control architecture", + "AAAI Technical Report SSS-96-04: Planning with Incomplete Information for Robot Problems": "AAAI technical report SSS-96-04: planning with incomplete information for robot problems", + "News From the Trenches: An Overview of Unmanned Spacecraft for AI": "News from the trenches: an overview of unmanned spacecraft for AI", + "Artificial Intelligence and Mobile Robots": "Artificial intelligence and mobile robots", + "On Three-Layer Architectures": "On three-layer architectures", + "World Modeling for the Dynamic Construction of Real-Time Control Plans": "World modeling for the dynamic construction of real-time control plans", + "CIRCA: The Cooperative Intelligent Real-Time Control Architecture": "CIRCA: the cooperative intelligent real-time control architecture", + "Computational Intelligence: A Logical Approach": "Computational intelligence: a logical approach", + "A Common Knowledge Representation for Plan Generation and Reactive Execution": "A common knowledge representation for plan generation and reactive execution", + "Planning and Reacting in Uncertain and Dynamic Environments": "Planning and reacting in uncertain and dynamic environments", + "IJCAI-97": "IJCAI-97", + "Model Minimization, Regression and Propositional STRIPS Planning": "Model minimization, regression and propositional STRIPS planning", + "Model Minimization in Markov Decision Processes": "Model minimization in markov decision processes", + "Building and Refining Abstract Planning Cases by Change of Representation Language": "Building and refining abstract planning cases by change of representation language", + "Plan Development Using Local Probabilistic Models": "Plan development using local probabilistic models", + "Resource Allocation for a Limited Real-Time Agent Using a Temporal Probabilistic World Model": "Resource allocation for a limited real-time agent using a temporal probabilistic world model", + "Decision-Theoretic Planning: Structural Assumptions and Computational Leverage": "Decision-theoretic planning: structural assumptions and computational leverage", + "Proceedings of the Thirteenth International Conference on Machine Learning": "Proceedings of the thirteenth international conference on machine learning", + "Approximating Value Trees in Structured Dynamic Programming": "Approximating value trees in structured dynamic programming", + "Proceedings of the Fourteenth International Joint Conference on Artificial Intelligence": "Proceedings of the fourteenth international joint conference on artificial intelligence", + "Exploiting Structure in Policy Construction": "Exploiting structure in policy construction", + "A Probabilistic Object-oriented Data Model": "A probabilistic object-oriented data model", + "Immobile Robots: AI in the New Millennium": "Immobile robots: AI in the new millennium", + "A Model-based Approach to Reactive Self-configuring Systems": "A model-based approach to reactive self-configuring systems", + "Representing Sensing Actions: The Middle Ground Revisited": "Representing sensing actions: the middle ground revisited", + "A Developer's Guide to the Longbow Discourse Planning System": "A developer's guide to the longbow discourse planning system", + "Let's Plan It Deductively!": "Let's plan it deductively!", + "Fifteenth International Joint Conference on Artificial Intelligence": "Fifteenth international joint conference on artificial intelligence", + "Robust Periodic Planning and Execution for Autonomous Spacecraft": "Robust periodic planning and execution for autonomous spacecraft", + "Decision-Theoretic Deliberation Scheduling for Problem Solving in Time-Constrained Environments": "Decision-theoretic deliberation scheduling for problem solving in time-constrained environments", + "A Robust and Fast Action Selection Mechanism for Planning": "A robust and fast action selection mechanism for planning", + "Planning with Incomplete Information as Heuristic Search in Belief Space": "Planning with incomplete information as heuristic search in belief space", + "Learning Depth-First Search: A Unified Approach to Heuristic Search in Deterministic and Non-Deterministic Settings, and its application to MDPs": "Learning depth-first search: a unified approach to heuristic search in deterministic and non-deterministic settings, and its application to MDPs", + "Multiagent Mission Specification and Execution": "Multiagent mission specification and execution", + "Planned Team Activity": "Planned team activity", + "Technical Note": "Technical note", + "Implementing Agent Teams in Dynamic Multi-agent Environments": "Implementing agent teams in dynamic multi-agent environments", + "AI Meets Authoring: User Models for Intelligent Multimedia": "AI meets authoring: user models for intelligent multimedia", + "Efficient Graph Automorphism by Vertex Partitioning": "Efficient graph automorphism by vertex partitioning", + "Arc and Path Consistency Revisited": "Arc and path consistency revisited", + "Comments on Mohr and Henderson's Path Consistency Algorithm": "Comments on mohr and henderson's path consistency algorithm", + "An Optimal k/-consistency algorithm": "An optimal k/-consistency algorithm", + "CI2 – A Logic for Plural representation": "CI2 – a logic for plural representation", + "Preference Semantics: a family history": "Preference semantics: a family history", + "An Integrated Architecture for Operating Procedure Synthesis": "An integrated architecture for operating procedure synthesis", + "Communication of Intent in Distributed Supervisory Control Systems": "Communication of intent in distributed supervisory control systems", + "CHIRON: Planning in an Open-textured Domain": "CHIRON: planning in an open-textured domain", + "Selection and Information: A Class-based Approach to Lexical Relationships": "Selection and information: a class-based approach to lexical relationships", + "A General Abductive System with Application to Plan Recognition and Diagnosis": "A general abductive system with application to plan recognition and diagnosis", + "Surface Reasoning": "Surface reasoning", + "A Logic for Natural Language": "A logic for natural language", + "A Lexical Extension of Montague Semantics": "A lexical extension of montague semantics", + "Five Papers on WordNet": "Five papers on WordNet", + "CSL Report": "CSL report", + "Proceedings of the American Control Conference (ACC)": "Proceedings of the american control conference (ACC)", + "Solus: An Autonomous Aircraft for Flight Control and Trajectory Planning Research": "Solus: an autonomous aircraft for flight control and trajectory planning research", + "Detecting and Reacting to Unplanned-for World States": "Detecting and reacting to unplanned-for world states", + "Causal Models of Mobile Service Robot Behavior": "Causal models of mobile service robot behavior", + "Constructing Conditional Plans by a Theorem-prover": "Constructing conditional plans by a theorem-prover", + "Planning Parallel Actions": "Planning parallel actions", + "Proceedings of ECP-99": "Proceedings of ECP-99", + "Planning as Model-checking": "Planning as model-checking", + "Robust Agent Teams via Socially-Attentive monitoring": "Robust agent teams via socially-attentive monitoring", + "A Semantics and Complete Algorithm for Subsumption in the CLASSIC Description Logic": "A semantics and complete algorithm for subsumption in the CLASSIC description logic", + "Living with Classic: When and How to use a Kl-One-like Language": "Living with classic: when and how to use a kl-one-like language", + "ACM SIGMOD International Conference on the Management of Data": "ACM SIGMOD international conference on the management of data", + "CLASSIC: A Structural Data Model for Objects": "CLASSIC: a structural data model for objects", + "Conformant Planning via Symbolic Model Checking": "Conformant planning via symbolic model checking", + "Design-to-time Real-Time Scheduling": "Design-to-time real-time scheduling", + "Proceedings of the First Goddard Workshop on Formal Approaches to Agent-Based Systems (FAABS'00)": "Proceedings of the first goddard workshop on formal approaches to agent-based systems (FAABS'00)", + "APT Agents: Agents That Are Adaptive, Predictable and Timely": "APT agents: agents that are adaptive, predictable and timely", + "Enhancing Model Checking in Verification by AI techniques": "Enhancing model checking in verification by AI techniques", + "Planning by Rewriting": "Planning by rewriting", + "Conference on Intelligent Information Processing (IIP 2000) of the International Federation for Information Processing World Computer Congress (WCC 2000)": "Conference on intelligent information processing (IIP 2000) of the international federation for information processing world computer congress (WCC 2000)", + "Component-Based Support for Building Knowledge-Acquisition Systems": "Component-based support for building knowledge-acquisition systems", + "Second International Conference on Knowledge Engineering and Knowledge Management (EKAW'2000)": "Second international conference on knowledge engineering and knowledge management (EKAW'2000)", + "Twelfth International Conference on Software Engineering and Knowledge Engineering (SEKE2000)": "Twelfth international conference on software engineering and knowledge engineering (SEKE2000)", + "Knowledge-Acquisition Interfaces for Domain Experts: An Empirical Evaluation of Protege-2000": "Knowledge-acquisition interfaces for domain experts: an empirical evaluation of protege-2000", + "Creating Semantic Web Contents with Protege-2000": "Creating semantic web contents with protege-2000", + "Proceedings of the First International Conference on Knowledge Capture (K-Cap'01)": "Proceedings of the first international conference on knowledge capture (K-cap'01)", + "Knowledge Entry as the Graphical Assembly of Components": "Knowledge entry as the graphical assembly of components", + "Planning for Temporally Extended Goals": "Planning for temporally extended goals", + "Using Temporal Logics to Express Search Control Knowledge for Planning": "Using temporal logics to express search control knowledge for planning", + "Interleaving Planning and Execution in a Multiagent Team Planning Environment": "Interleaving planning and execution in a multiagent team planning environment", + "AIPS'00 Planning Competition": "AIPS'00 planning competition", + "Building Problem Solvers": "Building problem solvers", + "Theories of Action, Planning, and Robot Control: Bridging the Gap: Proceedings of the 1996 AAAI Workshop": "Theories of action, planning, and robot control: bridging the gap: proceedings of the 1996 AAAI workshop", + "Unified Information and Control Flow in Hierarchical Task Networks": "Unified information and control flow in hierarchical task networks", + "Case-Based Reasoning Integrations: Papers from the 1998 AAAI Workshop": "Case-based reasoning integrations: papers from the 1998 AAAI workshop", + "AAAI Technical Report": "AAAI technical report", + "Hybrid Planning: An Approach to Integrating Generative and Case-based Planning": "Hybrid planning: an approach to integrating generative and case-based planning", + "IMPACTing SHOP: Putting an AI Planner into a Multi-Agent Environment": "IMPACTing SHOP: putting an AI planner into a multi-agent environment", + "Applications of SHOP and SHOP2": "Applications of SHOP and SHOP2", + "PDDL—The Planning Domain Definition Language": "PDDL—the planning domain definition language", + "PDDL2.1: An Extension to PDDL for Expressing Temporal Planning Domains.": "PDDL2.1: an extension to PDDL for expressing temporal planning domains.", + "The 3rd International Planning Competition: Results and Analysis.": "The 3rd international planning competition: results and analysis.", + "Proceedings of the 3rd International NASA Workshop on Planning and Scheduling for Space": "Proceedings of the 3rd international NASA workshop on planning and scheduling for space", + "Proceedings ICTAI": "Proceedings ICTAI", + "VAL: Automatic Plan Validation, Continuous Effects and Mixed Initiative Planning Using PDDL": "VAL: automatic plan validation, continuous effects and mixed initiative planning using PDDL", + "Plan Stability: Replanning versus Plan Repair": "Plan stability: replanning versus plan repair", + "PDDL2.2: The Language for the Classical Part of the 4th International Planning Competition": "PDDL2.2: the language for the classical part of the 4th international planning competition", + "Applying Automatic Planning Systems to Airport Ground-Traffic Control — A Feasibility Study": "Applying automatic planning systems to airport ground-traffic control — a feasibility study", + "The Deterministic Part of IPC-4: An Overview": "The deterministic part of IPC-4: an overview", + "Towards Realistic Benchmarks for Planning: the Domains Used in the Classical Part of IPC-4": "Towards realistic benchmarks for planning: the domains used in the classical part of IPC-4", + "Engineering Benchmarks for Planning: the Domains Used in the Deterministic Part of IPC-4": "Engineering benchmarks for planning: the domains used in the deterministic part of IPC-4", + "Recent Advances in AI Planning": "Recent advances in AI planning", + "Making Believers out of Computers": "Making believers out of computers", + "The Act-Editor User's Guide: A Manual for Version 2.2": "The act-editor user's guide: a manual for version 2.2", + "Proceedings of the 10th IEEE International Conference on Tools with Artificial Intelligence": "Proceedings of the 10th IEEE international conference on tools with artificial intelligence", + "A Tool-Supported Approach to Engineering HTN Planning Models": "A tool-supported approach to engineering HTN planning models", + "AAAI Spring Symposium on Planning with Incomplete Information for Robot Problems": "AAAI spring symposium on planning with incomplete information for robot problems", + "Using a Layered Control Architecture to Alleviate Planning with Incomplete Information": "Using a layered control architecture to alleviate planning with incomplete information", + "Transactions and Change in Logic Databases": "Transactions and change in logic databases", + "Inductive Definability and the Situation Calculus": "Inductive definability and the situation calculus", + "Criteria Directed Task Scheduling": "Criteria directed task scheduling", + "Proceedings of the Thirteenth Florida Artificial Intelligence Research Symposium (FLAIRS00)": "Proceedings of the thirteenth florida artificial intelligence research symposium (FLAIRS00)", + "Using a Reactive Planner as the Basis for a Dialogue Agent": "Using a reactive planner as the basis for a dialogue agent", + "American Institute of Aeronautics and Astronautics": "American institute of aeronautics and astronautics", + "Human vs. Autonomous Control of UAV Surveillance": "Human vs. Autonomous control of UAV surveillance", + "Proceedings of the 1st Space Exploration Conference: Continuing the Voyage of Discovery": "Proceedings of the 1st space exploration conference: continuing the voyage of discovery", + "Trusted Autonomy for Spaceflight Systems": "Trusted autonomy for spaceflight systems", + "Working Notes of the AAAI Spring Symposium on Human Interaction with Autonomous System Over Extended Operations": "Working notes of the AAAI spring symposium on human interaction with autonomous system over extended operations", + "Human-interaction challenges in UAV-based Autonomous Surveillance": "Human-interaction challenges in UAV-based autonomous surveillance", + "Automated Planning: Theory and Practice": "Automated planning: theory and practice", + "VHPOP: Versatile Heuristic Partial Order Planner.": "VHPOP: versatile heuristic partial order planner.", + "International Semantic Web Conference": "International semantic web conference", + "Automating DAML-S Web Services Composition Using SHOP2": "Automating DAML-S web services composition using SHOP2", + "Proceedings of Planning for Web Services Workshop in ICAPS 2003": "Proceedings of planning for web services workshop in ICAPS 2003", + "Automatic Web Services Composition Using SHOP2": "Automatic web services composition using SHOP2", + "User Modeling": "User modeling", + "Generating Artificial Corpora for Plan Recognition": "Generating artificial corpora for plan recognition", + "Hierarchical Goal Recognition": "Hierarchical goal recognition", + "Plan Constraints and Preferences in PDDL3": "Plan constraints and preferences in PDDL3", + "Planning with Qualitative Temporal Preferences": "Planning with qualitative temporal preferences", + "Programming Hierarchical Task Networks in the Situation Calculus": "Programming hierarchical task networks in the situation calculus", + "Extending the Knowledge-Based Approach to Planning with Incomplete Information and Sensing": "Extending the knowledge-based approach to planning with incomplete information and sensing", + "Leap Before You Look: Information Gathering in the PUCCINI Planner": "Leap before you look: information gathering in the PUCCINI planner", + "Sound and Efficient Closed-World Reasoning for Planning": "Sound and efficient closed-world reasoning for planning", + "A Validation Structure-Based Theory of Plan Modification and Reuse": "A validation structure-based theory of plan modification and reuse", + "Synthesizing Robust Plans under Incomplete Domain Models": "Synthesizing robust plans under incomplete domain models", + "KR2006": "KR2006", + "Course of Action Generation for Cyber Security Using Classical Planning": "Course of action generation for cyber security using classical planning", + "The Description Logic Handbook — Theory, Implementation and Applications": "The description logic handbook — theory, implementation and applications", + "Message-Based Web Service Composition, Integrity Constraints, and Planning under Uncertainty: A New Connection": "Message-based web service composition, integrity constraints, and planning under uncertainty: a new connection", + "Planning with Loops": "Planning with loops", + "Learning Generalized Plans Using Abstract Counting": "Learning generalized plans using abstract counting", + "Using Abstraction and Nondeterminism to Plan Reaction Loops": "Using abstraction and nondeterminism to plan reaction loops", + "Machine Learning": "Machine learning", + "Proceedings of the ICAPS-07 Workshop on AI Planning and Learning": "Proceedings of the ICAPS-07 workshop on AI planning and learning", + "Transfer Learning of Hierarchical Task-Network Planning Methods in a Real-Time Strategy Game": "Transfer learning of hierarchical task-network planning methods in a real-time strategy game", + "Proceedings of the Fifth International Conference on Knowledge Capture (KCAP-09)": "Proceedings of the fifth international conference on knowledge capture (KCAP-09)", + "A Goal- and Dependency-Driven Algorithm for Learning Hierarchical Task Networks": "A goal- and dependency-driven algorithm for learning hierarchical task networks", + "Practical Planning: Extending the Classical AI Planning Paradigm": "Practical planning: extending the classical AI planning paradigm", + "A Continuous Planning and Execution Framework": "A continuous planning and execution framework", + "ILP-05": "ILP-05", + "ICML-97": "ICML-97", + "Learning Goal-Decomposition Rules using Exercises": "Learning goal-decomposition rules using exercises", + "ILP-09": "ILP-09", + "Inductive Generalization of Analytically Learned Goal Hierarchies": "Inductive generalization of analytically learned goal hierarchies", + "Proceedings of the 9th International Conference on Machine Learning": "Proceedings of the 9th international conference on machine learning", + "Investigating Explanation-Based Learning": "Investigating explanation-based learning", + "ARMS: Acquiring Robotic Assembly Plans": "ARMS: acquiring robotic assembly plans", + "ICML-06": "ICML-06", + "Learning Hierarchical Task Networks by Observation": "Learning hierarchical task networks by observation", + "Learning Goal Hierarchies from Structured Observations and Expert Annotations": "Learning goal hierarchies from structured observations and expert annotations", + "Integrating ILP and EBL": "Integrating ILP and EBL", + "Proceedings of the Third International Workshop on Multi-Strategy Learning (MSL-96)": "Proceedings of the third international workshop on multi-strategy learning (MSL-96)", + "Integrating EBL and ILP to Acquire Control Rules for Planning": "Integrating EBL and ILP to acquire control rules for planning", + "AAAI-10": "AAAI-10", + "Learning Methods to Generate Good Plans: Integrating HTN Learning and Reinforcement Learning": "Learning methods to generate good plans: integrating HTN learning and reinforcement learning", + "IJCAI-09": "IJCAI-09", + "Learning Hierarchical Task Networks for Nondeterministic Planning Domains": "Learning hierarchical task networks for nondeterministic planning domains", + "AAAI-08": "AAAI-08", + "HTN-MAKER: Learning HTNs with Minimal Additional Knowledge Engineering Required": "HTN-MAKER: learning HTNs with minimal additional knowledge engineering required", + "Artificial Intelligence : A Modern Approach": "Artificial intelligence : a modern approach", + "An Architecture for Adversarial Planning": "An architecture for adversarial planning", + "IJCAI Proceedings": "IJCAI proceedings", + "A Heuristic Search Approach to Planning with Temporally Extended Preferences": "A heuristic search approach to planning with temporally extended preferences", + "Planning with First-Order Temporally Extended Goals using Heuristic Search": "Planning with first-order temporally extended goals using heuristic search", + "Proceedings of the Seventeenth International Conference on Automated Planning and Scheduling (ICAPS-07)": "Proceedings of the seventeenth international conference on automated planning and scheduling (ICAPS-07)", + "Exploiting Procedural Domain Control Knowledge in State-of-the-Art Planners": "Exploiting procedural domain control knowledge in state-of-the-art planners", + "From Conformant into Classical Planning: Efficient Translations that May Be Complete Too": "From conformant into classical planning: efficient translations that may be complete too", + "Proceedings of the 14th International Conference on Automated Planning and Scheduling ICAPS-04": "Proceedings of the 14th international conference on automated planning and scheduling ICAPS-04", + "Fault Tolerant Planning: Toward Probabilistic Uncertainty Models in Symbolic Non-Deterministic Planning": "Fault tolerant planning: toward probabilistic uncertainty models in symbolic non-deterministic planning", + "Solving Planning-Graph by Compiling It into CSP": "Solving planning-graph by compiling it into CSP", + "Dynamic Programming for POMDPs Using a Factored State Representation": "Dynamic programming for POMDPs using a factored state representation", + "The LAMA Planner: Guiding Cost-Based Anytime Planning with Landmarks": "The LAMA planner: guiding cost-based anytime planning with landmarks", + "FF: The Fast-Forward PLanning System": "FF: the fast-forward PLanning system", + "The Fast Downward Planning System": "The fast downward planning system", + "Changes in PDDL 3.1": "Changes in PDDL 3.1", + "BNF definition of PDDL 3.1": "BNF definition of PDDL 3.1", + "ICAPS Workshop on AI Planning and Learning": "ICAPS workshop on AI planning and learning", + "NDDL Reference": "NDDL reference", + "The FF Planning System: Fast Plan Generation Through Heuristic Search": "The FF planning system: fast plan generation through heuristic search", + "Domain Independent Approaches for Finding Diverse Plans": "Domain independent approaches for finding diverse plans", + "AAAI-99": "AAAI-99", + "Generating Qualitatively Different Plans through Metatheoretic Biases": "Generating qualitatively different plans through metatheoretic biases", + "Proceedings AAAI": "Proceedings AAAI", + "Generating Diverse Plans Using Quantitative and Qualitative Plan Distance Metrics": "Generating diverse plans using quantitative and qualitative plan distance metrics", + "Proceedings of the 16th Conference on Very Large Databases, Morgan Kaufman pubs. (Los Altos CA), Brisbane": "Proceedings of the 16th conference on very large databases, morgan kaufman pubs. (los altos CA), brisbane", + "ILOG: Declarative Creation and Manipulation of Object-Identifiers": "ILOG: declarative creation and manipulation of object-identifiers", + "LAO*: A Heuristic-Search Algorithm that Finds Solutions with Loops": "LAO*: a heuristic-search algorithm that finds solutions with loops", + "Landmark-Based Plan Distance Measures for Diverse Planning": "Landmark-based plan distance measures for diverse planning", + "Logics in Artificial Intelligence": "Logics in artificial intelligence", + "Z-log: Applying System-Z": "Z-log: applying system-Z", + "Web Intelligence and Intelligent Agent Technology (WI-IAT), 2010 IEEE/WIC/ACM International Conference on": "Web intelligence and intelligent agent technology (WI-IAT), 2010 IEEE/WIC/ACM international conference on", + "An Investigation of Potency of eWOM Messages with a Focus on Subjective Rank Expressions": "An investigation of potency of eWOM messages with a focus on subjective rank expressions", + "Proceedings ICAPS": "Proceedings ICAPS", + "Evaluating Diversity in Classical Planning": "Evaluating diversity in classical planning", + "NIPS-2000": "NIPS-2000", + "APRICODD: Approximate Policy Construction using Decision Diagrams": "APRICODD: approximate policy construction using decision diagrams", + "Proceedings of the Sixth International Conference on Artificial Intelligence Planning Systems, April 23-27, 2002, Toulouse, France": "Proceedings of the sixth international conference on artificial intelligence planning systems, april 23-27, 2002, toulouse, france", + "Symbolic Pattern Databases in Heuristic Search Planning": "Symbolic pattern databases in heuristic search planning", + "Planning with Sharable Resource Constraints": "Planning with sharable resource constraints", + "Proceedings of the AAAI Spring Symposium: Formal Verification and Modeling in Human-Machine Systems": "Proceedings of the AAAI spring symposium: formal verification and modeling in human-machine systems", + "Formal Specification and Synthesis of Mission Plans for Unmanned Aerial Vehicles": "Formal specification and synthesis of mission plans for unmanned aerial vehicles", + "Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence": "Proceedings of the twenty-eighth AAAI conference on artificial intelligence", + "Reasoning on LTL on Finite Traces: Insensitivity to Infiniteness": "Reasoning on LTL on finite traces: insensitivity to infiniteness", + "Fast Planning Through Planning Graph Analysis": "Fast planning through planning graph analysis", + "Monte-Carlo Exploration for Deterministic Planning": "Monte-carlo exploration for deterministic planning", + "Seventh International Planning Competition": "Seventh international planning competition", + "Activity Planning for a Lunar Orbital Mission": "Activity planning for a lunar orbital mission", + "Essentials of Artificial Intelligence": "Essentials of artificial intelligence" +} diff --git a/test/tests/utilitiesTest.js b/test/tests/utilitiesTest.js index 5340e25..bb949d9 100644 --- a/test/tests/utilitiesTest.js +++ b/test/tests/utilitiesTest.js @@ -1,4 +1,15 @@ describe("Zotero.Utilities", function() { + describe("sentenceCase", function() { + it("should stably perform sentence-casing", function () { + let data = loadSampleData('sentenceCase'); + + for (let tc in data) { + let sentenceCased = Zotero.Utilities.sentenceCase(tc); + assert.equal(sentenceCased, data[tc]); + } + }); + }); + describe("cleanAuthor", function() { it('should parse author names', function() { for(let useComma of [false, true]) { diff --git a/utilities.js b/utilities.js index b681553..ebaabf2 100644 --- a/utilities.js +++ b/utilities.js @@ -118,6 +118,65 @@ var Utilities = { }; }, + sentenceCase: function (text) { + const preserve = []; + + // sub-sentence start + text.replace(/([.?!][\s]+)(<[^>]+>)?([\p{Lu}])/ug, (match, end, markup, char, i) => { + markup = markup || ""; + if (!text.substring(0, i + 1).match(/(\p{Lu}[.]){2,}$/u)) { // prevent "U.S. Taxes" from starting a new sub-sentence + preserve.push({ start: i + end.length + markup.length, end: i + end.length + markup.length + char.length }); + } + }); + + // protect leading capital + text.replace(/^(<[^>]+>)?([\p{Lu}])/u, (match, markup, char) => { + markup = markup || ""; + preserve.push({ start: markup.length, end: markup.length + char.length }); + }); + + // protect nocase + text.replace(/.*?<\/span>|.*?<\/nc>/gi, (match, i) => { + preserve.push({ start: i, end: i + match.length, description: 'nocase' }); + }); + + // mask html tags with characters so the sentence-casing can deal with them as simple words + let masked = text.replace(/<[^>]+>/g, (match, i) => { + preserve.push({ start: i, end: i + match.length, description: 'markup' }); + return '\uFFFD'.repeat(match.length); + }); + + masked = masked + .replace(/[;:]\uFFFD*\s+\uFFFD*A\s/g, match => match.toLowerCase()) + .replace(/[–—]\uFFFD*\s*\uFFFD*A\s/g, match => match.toLowerCase()) + // words, compound words, and acronyms (latter also catches U.S.A.) + .replace(/([\u{FFFD}\p{L}\p{N}\p{No}]+([\u{FFFD}\p{L}\p{N}\p{No}\p{Pc}]*))|(\s(\p{Lu}+[.]){2,})?/ug, word => { + const unmasked = word.replace(/\uFFFD/g, ''); + + if (unmasked.length === 1) { + return unmasked === 'A' ? word.toLowerCase() : word + } + + // inner capital somewhere + if (unmasked.match(/.\p{Lu}/u)) { + return word + } + + // identifiers or allcaps + if (unmasked.match(/^\p{L}\p{L}*[\p{N}\p{No}][\p{L}\p{N}\p{No}]*$/u) || unmasked.match(/^[\p{Lu}\p{N}\p{No}]+$/u)) { + return word + } + + return word.toLowerCase() + }); + + for (const { start, end } of preserve) { + masked = masked.substring(0, start) + text.substring(start, end) + masked.substring(end); + } + + return masked; + }, + /** * Fixes author name capitalization. * Splits names into space-separated parts and only changes parts either in all uppercase