Layout Inference

Total Page:16

File Type:pdf, Size:1020Kb

Layout Inference LAYOUT INFERENCE: FILE SCHEMA RECOGNITION VIA CONTENT-BASED ORACLES LAYOUT INFERENCE: FILE SCHEMA RECOGNITION VIA CONTENT-BASED ORACLES A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy By Reid A. Phillips University of Arkansas, 2006 Master of Science in Computer Science August 2009 University of Arkansas ABSTRACT Some organizations routinely (e.g., monthly) process tens of thousands of flat files, files consisting of records containing a fixed number of fields, received from third parties. Currently, the process of characterizing each file’s encoding, formatting elements, structure, and content is a manual process, expensive in that the process costs human time, delays processing the files, and is error prone. This dissertation provides methods for automatically inferring the specified meta data associated with these files. In order to mine, persist, transform, or in some other way process structured data contained within a flat file, the properties associated with a file must first be known. Within this paper, the identification of these properties will be referred to as the layout inference problem, where a layout is a specification of the characteristics associated with a file. Typically a manual task, layout inference can benefit from an automated tool designed to replace or assist human involvement in this process. In defining the result of this process, the layout, the first step is to identify the properties to be inferred. These characteristics are requisite to read and process the contents of a file and include but are not necessarily limited to: the schema of the data records contained within a file, the character encoding, and other formatting details. Thus layout inference is concerned with providing an encompassing description of a file rather than a single characteristic (e.g., only the character encoding). Once available, the final step in the layout inference problem is to communicate the produced layout in a meaningful manner to any interested parties. The approach to this problem described in this paper is primarily statistical in nature. Statistical solutions, while potentially more ambiguous, can be considered to be better than other solutions because they are more adaptive: gracefully handling a limited amount of error and incomplete information along with many unforeseen circumstances. Another important characteristic of the approach detailed herein is a conglomeration of expert agents. These agents provide the means for identification of the file properties as each agent is an expert concerning a respective property. By applying their respective knowledge in various ways, as appropriate with respect to the property being determined, the various layout characteristics may be inferred. Together the statistical results of expert knowledge agents provide a powerful approach to solving the layout inference problem. The applicability of this approach towards the layout inference problem will be shown through results generated by an implemented prototype. These results will indicate the prototype’s performance (i.e., accuracy and run time) with respect to a representative set of data files; consequently showing the ability of the defined approach and the promise related to certain areas of future work. This thesis is approved for recommendation to the Graduate Council. Thesis Directors: ____________________________________ Wing-Ning Li ____________________________________ Craig Thompson Thesis Committee: ____________________________________ Gordon Beavers ____________________________________ David Douglas THESIS DUPLICATION RELEASE I hereby authorize the University of Arkansas Libraries to duplicate this thesis when needed for research and/or scholarship. Agreed ________________________________________ Refused ________________________________________ ACKNOWLEDGEMENTS I thank the Lord, Jesus Christ, for granting me the ability and endurance necessary for this project and my educational career. I am grateful to my parents, Timothy and Charmaine Phillips, for their continuous support. In all aspects of my life their assistance and guidance has been a wonderful blessing. I thank my advisors, Drs. Craig Thompson and Wing-Ning Li, for their advice and direction concerning both this thesis and graduate research. It is unlikely I would have reached this point without their continual patience, guidance, and support. I also appreciate Drs. Gordon Beavers and David Douglas: Dr. Beavers for his involvement in this research effort and both for their assistance as committee members. I also thank Acxiom Corporation for sponsoring me in present and past research projects, especially for suggesting the Layout Inference problem and providing guidance and test data. I especially thank Jonathan Loghry and David Nash for sharing their understanding of the problem and reviewing this work. Finally, I would like to also thank Wesley Deneke and Patrick Benham who have both directly contributed to this project. Your assistance has had a significant impact. Other friends, who have contributed in a less direct, yet no less meaningful way, include: Evan Kirkconnel, Jonathan Fleming, Kyle Stacey, Adam Vermillion, Nick LaSorte, Jonathan Schisler, and John Dixon. I appreciate you all. My thesis is dedicated to all of you. v vi TABLE OF CONTENTS 1. Introduction .................................................................................................................. 1 1.1 Problem Definition .................................................................................................. 1 1.2 Thesis Statement ...................................................................................................... 9 1.3 Organization of this Thesis .................................................................................... 10 2. Related Work ............................................................................................................. 11 2.1 Formal Languages .................................................................................................. 11 2.2 Information Extraction and Named Entity Recognition ........................................ 13 2.3 Statistical Learning ................................................................................................ 17 2.4 Tabular Data Recognition ...................................................................................... 19 2.5 Text Mining ........................................................................................................... 20 3. Layout Inference Approach ...................................................................................... 21 3.1 Layout Characteristics ........................................................................................... 21 3.2 Initial Steps ............................................................................................................ 21 3.3 Parsing a Record .................................................................................................... 23 3.3.1 Field Characteristics........................................................................................ 24 3.3.2 Record Length ................................................................................................. 25 3.3.3 Field Content Type ......................................................................................... 31 3.3.4 Results from Evidence .................................................................................... 43 3.4 Reporting the Results ............................................................................................. 43 4. Prototype Description ................................................................................................ 45 4.1 Introduction ............................................................................................................ 45 vii 4.2 Prototype Invocation .............................................................................................. 47 4.1 Setting Parameters ................................................................................................. 47 4.2 Character Encoding ................................................................................................ 51 4.3 Delimiters and File Type ....................................................................................... 52 4.5 Oracles ................................................................................................................... 53 4.5.1 Interfaces ......................................................................................................... 54 4.5.2 Container Class ............................................................................................... 56 4.5.3 Oracle Definitions ........................................................................................... 56 4.5.4 Oracle Implementations .................................................................................. 58 4.6 Record Length ........................................................................................................ 63 4.7 Record Layout Analysis ......................................................................................... 65 4.8 Identifying and Removing False Positives ............................................................ 68 4.8.1 Vertical Analysis ............................................................................................. 68 4.8.2 Conflict Resolution ........................................................................................
Recommended publications
  • About:Config .Init About:Me About:Presentation Web 2.0 User
    about:config .init about:me about:presentation Web 2.0 User View Technical View Simple Overview Picture Complex Overview Picture Main Problems Statistics I Statistics II .next Targets Of Attack Targets Methods Kinds Of Session Hijacking SQL Injection Introduction Examples SQL Injection Picture Analysis SQL Escaping SQL Escaping #2 SQL Parameter Binding XSS Introduction What Can It Do? Main Problem Types Of XSS Components Involved In XSS Reflected XSS Picture Reflected XSS Analysis (Server Side) Stored XSS Picture Server Side Stored XSS (Local) DOM XSS Example Picture local DOM XSS CSRF Introduction Example Picture CSRF Session Riding Analysis Complex Example Hijack Via DNS + XSS Picture DNS+XSS Combo Cookie Policy Analysis Variant Components .next Misplaced Trust 3rd Party Script Picture Trust 3rd Party Script Analysis Misplaced Trust In Middleware Misplaced Trust In Server­Local Data Picture Local Scripts Analysis Same Origin Policy Frame Policy UI Redressing Introduction Clickjacking Picture Clickjacking Analysis BREAK .next Summary of Defense Strategies "Best Effort" vs. "Best Security" Protection against Hijacking Session Theft Riding, Fixation, Prediction Separate by Trust Validation Why Input Validation at Server Check Origin and Target of Request Validation of Form Fields Validation of File Upload Validation Before Forwarding Validation of Server Output Validation of Target in Client Validation of Origin in Client Validation of Input in Client Normalization What's That? Normalizing HTML Normalizing XHTML Normalizing Image, Audio,
    [Show full text]
  • Database Globalization Support Guide
    Oracle® Database Database Globalization Support Guide 19c E96349-05 May 2021 Oracle Database Database Globalization Support Guide, 19c E96349-05 Copyright © 2007, 2021, Oracle and/or its affiliates. Primary Author: Rajesh Bhatiya Contributors: Dan Chiba, Winson Chu, Claire Ho, Gary Hua, Simon Law, Geoff Lee, Peter Linsley, Qianrong Ma, Keni Matsuda, Meghna Mehta, Valarie Moore, Cathy Shea, Shige Takeda, Linus Tanaka, Makoto Tozawa, Barry Trute, Ying Wu, Peter Wallack, Chao Wang, Huaqing Wang, Sergiusz Wolicki, Simon Wong, Michael Yau, Jianping Yang, Qin Yu, Tim Yu, Weiran Zhang, Yan Zhu This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S.
    [Show full text]
  • Plain Text & Character Encoding
    Journal of eScience Librarianship Volume 10 Issue 3 Data Curation in Practice Article 12 2021-08-11 Plain Text & Character Encoding: A Primer for Data Curators Seth Erickson Pennsylvania State University Let us know how access to this document benefits ou.y Follow this and additional works at: https://escholarship.umassmed.edu/jeslib Part of the Scholarly Communication Commons, and the Scholarly Publishing Commons Repository Citation Erickson S. Plain Text & Character Encoding: A Primer for Data Curators. Journal of eScience Librarianship 2021;10(3): e1211. https://doi.org/10.7191/jeslib.2021.1211. Retrieved from https://escholarship.umassmed.edu/jeslib/vol10/iss3/12 Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License. This material is brought to you by eScholarship@UMMS. It has been accepted for inclusion in Journal of eScience Librarianship by an authorized administrator of eScholarship@UMMS. For more information, please contact [email protected]. ISSN 2161-3974 JeSLIB 2021; 10(3): e1211 https://doi.org/10.7191/jeslib.2021.1211 Full-Length Paper Plain Text & Character Encoding: A Primer for Data Curators Seth Erickson The Pennsylvania State University, University Park, PA, USA Abstract Plain text data consists of a sequence of encoded characters or “code points” from a given standard such as the Unicode Standard. Some of the most common file formats for digital data used in eScience (CSV, XML, and JSON, for example) are built atop plain text standards. Plain text representations of digital data are often preferred because plain text formats are relatively stable, and they facilitate reuse and interoperability.
    [Show full text]
  • DICOM PS3.5 2021C
    PS3.5​ DICOM PS3.5 2021d - Data Structures and Encoding​ Page 2​ PS3.5: DICOM PS3.5 2021d - Data Structures and Encoding​ Copyright © 2021 NEMA​ A DICOM® publication​ - Standard -​ DICOM PS3.5 2021d - Data Structures and Encoding​ Page 3​ Table of Contents​ Notice and Disclaimer ........................................................................................................................................... 13​ Foreword ............................................................................................................................................................ 15​ 1. Scope and Field of Application ............................................................................................................................. 17​ 2. Normative References ....................................................................................................................................... 19​ 3. Definitions ....................................................................................................................................................... 23​ 4. Symbols and Abbreviations ................................................................................................................................. 27​ 5. Conventions ..................................................................................................................................................... 29​ 6. Value Encoding ...............................................................................................................................................
    [Show full text]
  • Fun with Unicode - an Overview About Unicode Dangers
    Fun with Unicode - an overview about Unicode dangers by Thomas Skora Overview ● Short Introduction to Unicode/UTF-8 ● Fooling charset detection ● Ambigiuous Encoding ● Ambigiuous Characters ● Normalization overflows your buffer ● Casing breaks your XSS filter ● Unicode in domain names – how to short payloads ● Text Direction Unicode/UTF-8 ● Unicode = Character set ● Encodings: – UTF-8: Common standard in web, … – UTF-16: Often used as internal representation – UTF-7: if the 8th bit is not safe – UTF-32: yes, it exists... UTF-8 ● Often used in Internet communication, e.g. the web. ● Efficient: minimum length 1 byte ● Variable length, up to 7 bytes (theoretical). ● Downwards-compatible: First 127 chars use ASCII encoding ● 1 Byte: 0xxxxxxx ● 2 Bytes: 110xxxxx 10xxxxxx ● 3 Bytes: 1110xxxx 10xxxxxx 10xxxxxx ● ...got it? ;-) UTF-16 ● Often used for internal representation: Java, .NET, Windows, … ● Inefficient: minimum length per char is 2 bytes. ● Byte Order? Byte Order Mark! → U+FEFF – BOM at HTML beginning overrides character set definition in IE. ● Y\x00o\x00u\x00 \x00k\x00n\x00o\x00w\x00 \x00t\x00h\x00i\x00s\x00?\x00 UTF-7 ● Unicode chars in not 8 bit-safe environments. Used in SMTP, NNTP, … ● Personal opinion: browser support was an inside job of the security industry. ● Why? Because: <script>alert(1)</script> == +Adw-script+AD4-alert(1)+ADw-/script+AD4- ● Fortunately (for the defender) support is dropped by browser vendors. Byte Order Mark ● U+FEFF ● Appears as:  ● W3C says: BOM has priority over declaration – IE 10+11 just dropped this insecure behavior, we should expect that it comes back. – http://www.w3.org/International/tests/html-css/character- encoding/results-basics#precedence – http://www.w3.org/International/questions/qa-byte-order -mark.en#bomhow ● If you control the first character of a HTML document, then you also control its character set.
    [Show full text]
  • Automatic Detection of Character Encoding and Language
    Automatic Detection of Character Encoding and Language Seungbeom Kim, Jongsoo Park {sbkim,jongsoo}@stanford.edu CS 229, Machine Learning Autumn 2007 Stanford University 1 Introduction their methods, we aimed at a simple algorithm which can be uniformly applied to every charset, and the algorithm The Internet is full of textual contents in various lan- is based on well-established, standard machine learning guages and character encodings, and their communica- techniques. We also studied the relationship between lan- tion across the linguistic borders is ever increasing. Since guage and charset detection, and compared byte-based al- the different encodings are not compatible with one an- gorithms and character-based algorithms. We used Na¨ıve other, communication protocols such as HTTP, HTML, Bayes (NB) and Support Vector Machine (SVM). and MIME are equipped with mechanisms to tag the char- Using the documents downloaded from Wikipedia [6], acter encoding (a.k.a. charset) used in the delivered con- we evaluated different combinations of algorithms and tent. However, as native speakers of a language whose compared them with the universal charset detector in character set does not fit in US-ASCII, we have encoun- Mozilla. We found two promising algorithms. The first tered a lot of web pages and e-mail messages that are one is a simple SVM whose feature is the frequency of encoded in or labeled with a wrong character encoding, byte values. The algorithm is uniform and very easy to which is often annoying or frustrating. Many authors, implement. It also only needs maximum 256 table entries especially of e-mail messages, are not aware of the en- per each charset and the detection time is much shorter coding issues, and their carelessness in choosing correct than other algorithms.
    [Show full text]
  • Web Internationalization
    Web Internationalization Abstract This is an introduction to internationalization on Web Internationalization the World Wide Web. The audience will learn about the standards that provide for global Standards and Practice interoperability and come away with an understanding of how to work with multilingual data on the Web. Character representation and the Unicode-based Reference Processing Model are described in detail. HTML, including HTML5, XHTML, XML (eXtensible Markup Language; for general markup), and CSS (Cascading Style Tex Texin, XenCraft Sheets; for styling information) are given Copyright © 2002-2018 Tex Texin particular emphasis. Internationalization and Unicode Conference IUC42 Web Internationalization Slide 2 Objectives Legend For This Presentation • Describe the standards that define the Icons used to indicate current product support: architecture & principles for I18N on the web • Scope limited to markup languages Google Internet Firefox Chrome Explorer • Provide practical advice for working with Supported: international data on the web, including the design and implementation of multilingual web Partially supported: sites and localization considerations Not supported: • Be introductory level – Condense 3 hours to 75-90 minutes. Caution This presentation and example code are available at: Highlights a note for users or developers to be careful. www.xencraft.com/training/webstandards.html Web Internationalization – Standards and Practice Slide 3 Web Internationalization Slide 4 How does the multilingual Web work? A Simple HTML Example Page • How does the server know – my language? – The encodings my browser supports? • Which Unicode normalization is best? • Are all Unicode characters useful on the Web? • Should I use character escapes or text? • Can CSS designs support multiple languages? Web Internationalization Slide 5 Web Internationalization Slide 6 Copyright © Tex Texin 2018.
    [Show full text]
  • Sphider-Plus Manual
    Sphider-plus manual Content 1. Introduction......................................................................................................................6 2. Version and legal info......................................................................................................6 3. Installation of version 3.0 – 3.2020d..............................................................................7 3.1 Preconditions...................................................................................................................................... 7 3.2 New installation................................................................................................................................... 7 3.3 Updating from version 1 and 2..........................................................................................................10 3.4 Updating from 3.x to 3.y....................................................................................................................10 4. Settings and customizing.............................................................................................12 5. Indexing..........................................................................................................................14 5.1 Various options................................................................................................................................. 14 5.2 Allow other hosts in same domain....................................................................................................15 5.3
    [Show full text]
  • Hitachi Ops Center V10.6.1 Open Source Software Packages
    Hitachi Ops Center V10.6.1 Open Source Software Packages Contact Information: Hitachi Ops Center Project Manager Hitachi Vantara LLC 2535 Augustine Drive Santa Clara, California 95054 Name of Product/Product Component Version License "Java Concurrency in Practice" book 1.0-redhat-4 Creative Commons Attribution annotations 2.5 Generic @agoric/babel-parser 7.10.5 The MIT License @agoric/babel-parser 7.12.11 The MIT License @angular-builders/custom-webpack 8.0.0-RC.0 The MIT License @angular-devkit/build-angular 0.800.0-rc.2 The MIT License @angular-devkit/build-angular 0.901.13 The MIT License @angular-devkit/core 7.3.8 The MIT License @angular-devkit/schematics 7.3.8 The MIT License @angular/animations 9.1.11 The MIT License @angular/animations 9.1.13 The MIT License @angular/cdk 9.2.4 The MIT License @angular/cdk-experimental 9.2.4 The MIT License @angular/cli 8.0.0 The MIT License @angular/cli 9.1.13 The MIT License @angular/common 9.1.11 The MIT License @angular/common 9.1.13 The MIT License @angular/compiler 9.1.11 The MIT License @angular/compiler 9.1.13 The MIT License @angular/compiler-cli 9.1.13 The MIT License @angular/core 7.2.15 The MIT License @angular/core 9.1.11 The MIT License @angular/core 9.1.13 The MIT License @angular/forms 7.2.15 The MIT License @angular/forms 9.1.0-next.3 The MIT License @angular/forms 9.1.11 The MIT License @angular/forms 9.1.13 The MIT License @angular/language-service 9.1.13 The MIT License @angular/platform-browser 7.2.15 The MIT License @angular/platform-browser 9.1.11 The MIT License @angular/platform-browser
    [Show full text]
  • Geonetwork User Manual (PDF)
    GeoNetwork User Manual Release 2.10.4-0 GeoNetwork September 23, 2021 CONTENTS 1 Preface 3 1.1 About this Project............................................3 1.2 License Information...........................................3 1.3 Author Information............................................4 2 Quick Start Guide 5 2.1 Geographic Information Management for all..............................5 2.2 Getting Started..............................................8 2.3 Viewing and Analysing the Data..................................... 21 2.4 Adding a metadata record........................................ 28 2.5 Uploading a New Record using the XML Metadata Insert Tool..................... 46 2.6 Metadata in Spatial Data Management.................................. 50 2.7 New Features............................................... 51 2.8 Installing the software.......................................... 55 2.9 Upgrading to a new Version....................................... 64 3 Administration 65 3.1 System configuration........................................... 65 3.2 Authentication.............................................. 75 3.3 OGC CSW server configuration..................................... 81 3.4 Advanced configuration......................................... 86 3.5 User and Group Administration..................................... 101 3.6 Localization............................................... 107 3.7 System Monitoring............................................ 108 4 Managing Metadata 111 4.1 Templates................................................
    [Show full text]
  • Dataparksearch Engine 4.50: Reference Manual Copyright © 2003-2008 by OOO Datapark Copyright © 2001-2003 by Lavtech.Com Corp
    DataparkSearch Engine 4.50 Reference manual DataparkSearch Engine 4.50: Reference manual Copyright © 2003-2008 by OOO DataPark Copyright © 2001-2003 by Lavtech.com corp. This project is dedicated to Noémie. Table of Contents 1. Introduction............................................................................................................................................1 1.1. DataparkSearch Features.............................................................................................................1 1.2. Where to get DataparkSearch. ....................................................................................................2 1.3. Disclaimer ...................................................................................................................................2 1.4. Authors........................................................................................................................................2 1.4.1. Contributors....................................................................................................................3 2. Installation..............................................................................................................................................4 2.1. SQL database requirements ........................................................................................................4 2.2. Supported operating systems ......................................................................................................4 2.3. Tools required for installation
    [Show full text]
  • Naming Text Encodings to Demystify Them
    Naming Text Encodings to Demystify Them Document #: P1885R6 Date: 2021-08-14 Programming Language C++ Audience: LEWG Reply-to: Corentin Jabot <[email protected]> Peter Brett <[email protected]> If you can’t name it, you probably don’t know what it is If you don’t know what it is, you don’t know what it isn’t Tony Van Eerd Target C++23 Abstract For historical reasons, all text encodings mentioned in the standard are derived from a locale object, which does not necessarily match the reality of how programs and systems interact. This model works poorly with modern understanding of text, ie the Unicode model separates encoding from locales which are purely rules for formatting and text transformations but do not affect which characters are represented by a sequence of code units. Moreover, the standard does not provide a way to query which encodings are expected or used by the environment, leading to guesswork and unavoidable UB. This paper introduces the notions of literal encoding, environment encoding, and a way to query them. Examples Listing the encoding #include <text_encoding> #include <iostream> void print(const std::text_encoding & c) { std::cout << c.name() << " (iana mib: " << c.mib() << ")\n" << "Aliases:\n"; 1 for(auto && a : c.aliases()) { std::cout << '\t' << a << '\n'; } } int main() { std::cout << "Literal Encoding: "; print(std::text_encoding::literal()); std::cout << "Wide Literal Encoding: "; print(std::text_encoding::wide_literal()); std::cout << "environment Encoding: "; print(std::text_encoding::environment());
    [Show full text]