WO2017099059A1 - 文書処理装置、方法および記憶媒体 - Google Patents

文書処理装置、方法および記憶媒体 Download PDF

Info

Publication number
WO2017099059A1
WO2017099059A1 PCT/JP2016/086185 JP2016086185W WO2017099059A1 WO 2017099059 A1 WO2017099059 A1 WO 2017099059A1 JP 2016086185 W JP2016086185 W JP 2016086185W WO 2017099059 A1 WO2017099059 A1 WO 2017099059A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
query
schema
structured document
schema information
Prior art date
Application number
PCT/JP2016/086185
Other languages
English (en)
French (fr)
Inventor
和大 船越
Original Assignee
日本電気株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社 filed Critical 日本電気株式会社
Priority to US15/780,707 priority Critical patent/US20180365273A1/en
Priority to JP2017555068A priority patent/JPWO2017099059A1/ja
Publication of WO2017099059A1 publication Critical patent/WO2017099059A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24542Plan optimisation
    • G06F16/24545Selectivity estimation or determination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • G06F16/835Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes

Definitions

  • the present invention relates to a technique for processing a structured document.
  • XML Extensible Markup Language
  • RDF Resource Description Framework
  • the XML document and the linked data are allowed to be extended to a free structure by the user as long as there is no contradiction as a syntax.
  • software that performs processing on a document having an existing structure may not correctly process a document having a structure that is freely expanded by a user. This is because it is not assumed that such an extended structure is input when the software is designed. Therefore, it is conceivable to limit expansion by the user.
  • the basic structure proposed by the standardization organization is used to represent information used in various organizational cultures and various business processes, expressive ability is insufficient.
  • Patent Document 1 An example of a technology related to such a problem is described in Patent Document 1.
  • the related technique described in Patent Document 1 searches and outputs a document structure related to a keyword from a plurality of structured documents stored in a database.
  • a structured document creator searches for a document structure that is similar in content to the document that he / she creates, and creates a structured document using the retrieved document structure. it can.
  • this related technique suppresses the flooding of various document structures.
  • the organizational standard enables interoperability of documents within an organization, but it is difficult to ensure interoperability of documents between organizations. This is because it is usually considered that there are different organizational standards depending on the organization. For this reason, software that processes a document structure based on an organization standard in a certain organization cannot perform mechanical processing on an unknown document structure based on an organization standard used in another organization. In particular, this problem becomes significant when considering the change of target organizations that require interoperability.
  • Patent Document 1 assumes that the creator of a structured document retrieves a desired document structure from the same database.
  • creators of structured documents in different organizations do not always search the same database for the document structure of the document to be created.
  • software that processes a document structure created using this related technique in a certain organization cannot perform mechanical processing on an unknown document structure created in another organization.
  • this problem becomes significant when considering the change of target organizations that require interoperability.
  • an object of the present invention is to provide a technique that enables mechanical processing on a structured document having an unknown document structure.
  • the document processing apparatus of the present invention associates schema information that identifies a schema that represents the structure of information included in a structured document, and shape information that identifies a shape that represents a constraint on the information.
  • a first storage means for storing the information, a schema that represents the query that can be issued to the structured document including the schema information, information having the structure represented by the schema information, and the concrete query.
  • the second storage means for associating and storing the abstract query, and when the unknown schema information is applied to the information included in the structured document to be processed, the first storage means Schema information associated with the shape information having an inheritance relationship with the applied shape information is related to the unknown schema information.
  • Inference means for determining as schema information, and in the second storage means, an abstract query input for the structured document to be processed and a specific query associated with the related schema information are converted into the structure of the processing target.
  • Query determining means for determining a specific query to be issued to the document.
  • the computer device stores the schema information for identifying the schema representing the structure of the information included in the structured document and the shape information for identifying the shape representing the constraint on the information in association with each other.
  • 1 storage means the schema information, a specific query representing a query that can be issued to a structured document including information having a structure represented by the schema information, and an abstract query that abstractly represents the specific query;
  • the first storage means applies the information to the information.
  • Schema information associated with shape information that has an inheritance relationship with respect to the shape information that has been associated with the unknown schema information In the second storage means, the abstract query input for the structured document to be processed and the specific query associated with the related schema information are stored in the structured document to be processed. It is determined as a specific query to be issued.
  • the storage medium of the present invention is a first storage that associates and stores schema information that identifies a schema that represents the structure of information included in a structured document, and shape information that identifies a shape that represents a constraint on the information.
  • the first storage means applies the information to the information.
  • Schema information associated with shape information having an inheritance relationship with shape information is related schema information related to the unknown schema information.
  • Inheritance relation inference step to be determined in the second storage means, the abstract query input for the structured document to be processed and the specific query associated with the related schema information
  • a program for causing a computer device to execute a query determination step for determining a specific query to be issued to a document is stored.
  • the present invention can provide a technique that enables mechanical processing of a structured document having an unknown document structure.
  • FIG. 1 shows a functional block configuration of a document processing apparatus 1 as a first embodiment of the present invention.
  • the document processing apparatus 1 includes a first storage unit 11, a second storage unit 12, an inference unit 13, and a query determination unit 14.
  • the document processing apparatus 1 is an information processing apparatus capable of processing a structured document, and can be configured by hardware elements as shown in FIG.
  • the document processing apparatus 1 includes a CPU (Central Processing Unit) 1001, a memory 1002, an output device 1003, an input device 1004, and a network interface 1005.
  • the memory 1002 includes a RAM (Random Access Memory), a ROM (Read Only Memory), an auxiliary storage device (such as a hard disk), and the like.
  • the output device 1003 is configured by a device that outputs information, such as a display device or a printer.
  • the input device 1004 is configured by a device that receives an input of a user operation, such as a keyboard or a mouse.
  • the network interface 1005 is an interface connected to a network configured by the Internet, a wired LAN (Local Area Network), a wireless LAN, a public line network, a mobile data communication network, or a combination thereof.
  • the first storage unit 11 and the second storage unit 12 are configured by the memory 1002.
  • the inference unit 13 includes a network interface 1005 and a CPU 1001 that reads and executes a computer program stored in the memory 1002.
  • the query determination unit 14 includes an input device 1004 and a CPU 1001 that reads and executes a computer program stored in the memory 1002. Note that the hardware configuration of the document processing apparatus 1 and each functional block thereof is not limited to the above-described configuration.
  • the first storage unit 11 stores schema information and shape information in association with each other.
  • the schema represents the structure of information included in the structured document.
  • the schema information is information for identifying such a schema.
  • schema information for identifying a schema is represented by a URI (Uniform Resource Identifier).
  • URI Uniform Resource Identifier
  • the definition contents of the schema are stored in this URI.
  • schema information for identifying a schema representing the structure of certain information is also referred to as schema information applied to the information.
  • a shape represents a restriction on information contained in a structured document.
  • the shape information is information for identifying such a shape.
  • shape information for identifying a shape is represented by a URI.
  • the definition content of the shape is stored in this URI.
  • shape information for identifying the shape representing the restriction of certain information is also referred to as shape information applied to the information.
  • the first storage unit 11 may store, for example, a set of shape information and schema information input in advance by the administrator or the like via the input device 1004 in association with each other.
  • the second storage unit 12 stores schema information, a specific query, and an abstract query in association with each other.
  • the specific query represents a query that can be issued to a structured document.
  • the specific query may represent processing for extracting desired information from the structured document.
  • the specific query may represent a process for registering / updating desired information in the structured document.
  • An abstract query is a query that abstractly represents a specific query.
  • the second storage unit 12 may store, for example, a set of schema information, a specific query, and an abstract query that are input in advance by the administrator or the like via the input device 1004 in association with each other.
  • the inference unit 13 relates to the unknown schema information based on the inheritance relationship of the shape information applied to the information. Determine schema information.
  • unknown schema information means that a specific query for information to which the schema information is applied is unknown.
  • the related schema information refers to schema information that has a structure that may at least partially match the unknown schema information. There is a high possibility that a specific query that can be issued for related schema information can be issued for unknown schema information.
  • the inference unit 13 determines whether the schema information applied to the information included in the structured document to be processed is unknown or known. In the present embodiment, whether the schema information is unknown or known can be determined based on whether the schema information is stored in the first storage unit 11 or the second storage unit 12. The schema information applied to the information included in the structured document to be processed can be acquired by analyzing the contents of the structured document to be processed.
  • the inference unit 13 applies the shape applied to the information included in the structured document to be processed when unknown schema information is applied to the information included in the structured document to be processed. Identify information.
  • the shape information applied to the information included in the structured document to be processed can be acquired by analyzing the contents of the structured document to be processed.
  • the inference unit 13 acquires shape information having an inheritance relationship with the specified shape information.
  • having an inheritance relationship means, for example, being used as a parent or an ancestor in the definition of the corresponding shape information.
  • the inheritance relationship of the shape information regarding the information included in the structured document can be acquired based on the definition content of the shape information.
  • the storage location of the definition content of such shape information can be obtained by analyzing the content of the structured document. If the storage location of the definition information of the corresponding shape information indicates a location on the network, the inference unit 13 may access the storage location via the network interface 1005.
  • the inference unit 13 associates the schema information associated with the shape information having the inheritance relationship with the shape information applied to the information included in the structured document to be processed in the first storage unit 11. Determine as schema information. Note that there may be a case where the shape information that is the parent of the corresponding shape information is not stored in the first storage unit 11. In this case, the inference unit 13 may repeat the process of acquiring the parent shape information until the shape information stored in the first storage unit 11 is obtained.
  • the query determination unit 14 acquires an abstract query for information included in the structured document to be processed as an input.
  • the abstract query may be input via the input device 1004.
  • the query determination part 14 acquires the specific query linked
  • the query determination unit 14 determines the acquired specific query as a specific query to be issued to the structured document to be processed.
  • the query determination unit 14 may issue the determined specific query for the structured document to be processed.
  • the inference unit 13 acquires a structured document to be processed (step S1).
  • the inference unit 13 determines whether unknown schema information is applied to the information included in the structured document to be processed (step S2). As described above, the inference unit 13 determines that the corresponding schema information is unknown if it is not stored in the first storage unit 11 or the second storage unit 12, and is not unknown if stored ( It is sufficient to determine that it is already known.
  • step S6 when the corresponding schema information is not unknown (it is known), the operation of the document processing apparatus 1 proceeds to step S6.
  • the inference unit 13 identifies shape information applied to the information included in the structured document to be processed (step S3).
  • the inference unit 13 searches the first storage unit 11 for shape information having an inheritance relationship with the shape information specified in step S3 (step S4).
  • the inference unit 13 refers to the definition content of the acquired shape information to identify the shape information that is the parent. Then, the inference unit 13 searches the first storage unit 11 for parent shape information. At this time, if the parent shape information is not stored in the first storage unit 11, the inference unit 13 further acquires the parent shape information by referring to the definition contents of the parent shape information. To do. In this way, the inference unit 13 repeats acquiring the parent shape information until the shape information stored in the first storage unit 11 is obtained.
  • the inference unit 13 determines the schema information associated with the shape information having the inheritance relationship as the related schema information of the unknown schema information in the first storage unit 11 (step S5).
  • the query determination unit 14 acquires an abstract query for information included in the structured document to be processed as an input (step S6).
  • the query determination unit 14 searches the second storage unit 12 for a specific query associated with the input abstract query and related schema information or known schema information (step S7).
  • the related schema information is the related schema information determined in step S5.
  • the known schema information is schema information when it is determined that the information is known in step S2.
  • the query determination unit 14 outputs error information (step S9).
  • the query determination unit 14 issues the searched specific query to the structured document to be processed. It determines as a query (step S10).
  • the document processing apparatus 1 ends its operation.
  • the document processing apparatus enables mechanical processing on a structured document having an unknown document structure.
  • the first storage unit associates and stores schema information that identifies a schema that represents the structure of information included in the structured document, and shape information that identifies a shape that represents a constraint related to the information.
  • the second storage unit associates schema information, a specific query representing a query that can be issued to a structured document including information based on the schema information, and an abstract query that abstractly represents the specific query. I remember.
  • the inference unit identifies shape information applied to the information.
  • the inference unit determines, as related schema information, the schema information associated with the shape information having an inheritance relationship with the shape information applied to the information in the first storage unit.
  • An abstract query for the structured document to be processed is input to the query determination unit. Then, the query determination unit determines, in the second storage unit, the specific query associated with the input abstract query and the related schema information as a specific query issued to the structured document to be processed. is there.
  • this embodiment it is possible to determine known schema information that is related to unknown schema information by using the inheritance relationship of the shape information.
  • the known schema information determined as relevant is likely to have a structure that partially matches the unknown schema information. For this reason, this embodiment can issue a specific query stored in association with known related schema information with respect to a structured document including information to which unknown schema information is applied.
  • processing such as data extraction and registration can be performed on a structured document including information to which unknown schema information is applied without newly designing software.
  • FIG. 4 shows the configuration of a document processing apparatus 2 as a second embodiment of the present invention.
  • the document processing apparatus 2 is different from the document processing apparatus 1 according to the first embodiment of the present invention in that an inference unit 23 is replaced with an inference unit 13 and a query determination unit is replaced with a query determination unit 14. 24 is different.
  • the document processing apparatus 2 and each functional block thereof can be configured by the hardware elements of the first embodiment of the present invention described with reference to FIG.
  • the hardware configuration of the document processing apparatus 2 and each functional block thereof is not limited to the above-described configuration.
  • the inference unit 23 is configured as follows in addition to the same configuration as the inference unit 13 in the first embodiment of the present invention. That is, the inference unit 23 registers the shape information applied to the information included in the structured document to be processed and the schema information applied to the information in the first storage unit 11 in association with each other. Note that registering means storing in the first storage unit 11. As a result, the schema information that is unknown in the structured document to be processed becomes known schema information associated with the shape information.
  • the inference unit 23 associates the shape information applied to the information included in the structured document to be processed for which the related schema information has been determined with the related schema information, and registers them in the first storage unit 11. .
  • the inference unit 23 can quickly relate the related schema information if the shape information inherited from the current shape information is applied to the information to which the unknown schema information is applied in the subsequent structured document to be processed. Can be acquired.
  • the first storage unit 11 may store a plurality of registrations associated with different schema information for the same shape information. That is, one of the different schema information is the unknown schema information applied to the information included in the structured document to be processed this time, and the other is determined as the related schema information for the unknown schema information. Schema information.
  • the inference unit 23 determines any of a plurality of schema information as the related schema information. May be.
  • the inference unit 23 may determine a plurality of schema information as related schema information when the corresponding shape information is applied to information included in a structured document to be processed later.
  • the query determination unit 24 may search for a specific query from the second storage unit 12 using each of the related schema information, and select an appropriate specific query.
  • the query determination unit 24 is configured as follows in addition to the same configuration as the query determination unit 14 in the first exemplary embodiment of the present invention.
  • the second storage unit 12 may not store an abstract query input for information included in the structured document to be processed and a specific query associated with related schema information.
  • the query determination unit 24 determines a specific query input from the outside as a specific query to be issued to the structured document to be processed.
  • the specific query is input via the input device 1004, for example.
  • the query determination unit 24 associates the specific query determined for the information included in the structured document to be processed, the schema information applied to the information, and the abstract query input for the information. Registered in the second storage unit 12. Note that registering means storing in the second storage unit 12. Thereby, if unknown schema information is applied to the information, the query determination unit 24 can store the abstract query and the specific query by making the unknown schema information known. If known schema information is applied to the information, the query determination unit 24 adds an abstract query and a specific query that have not been accumulated so far to the known schema information. Can be accumulated.
  • the document processing apparatus 2 operates in the same manner as in the first embodiment of the present invention from steps S1 to S5, and determines related schema information of unknown schema information.
  • the inference unit 23 associates the shape information applied to the information and the schema information applied to the information with respect to the information included in the structured document to be processed, and stores the first storage unit. 11 is registered. In addition, the inference unit 23 associates the shape information applied to the information with the determined related schema information and registers them in the first storage unit 11 (step S11).
  • the document processing apparatus 2 operates in the same manner as in the first embodiment of the present invention from step S6 to S7, and is associated with the input abstract query and related schema information or known schema information. Search for specific queries.
  • the query determination unit 24 acquires a specific query for information included in the structured document to be processed as an input (step S13). .
  • the query determining unit 24 associates the input specific query, the schema information applied to the information, and the abstract query input in step S6, and registers them in the second storage unit 12 (steps). S14).
  • step S14 the query determination unit 24 associates the obtained specific query, the schema information applied to the information, and the abstract query input in step S6 and registers them in the second storage unit 12 (step S14).
  • the query determination unit 24 determines the specific query obtained in step S7 or the specific query input in step S13 as a specific query to be issued to the structured document to be processed (step S15).
  • the document processing apparatus 2 finishes the operation.
  • schema information, an abstract query, and a specific query are stored in the second storage unit 12 in association with each other.
  • xxxx http: // yyyy
  • this URI represents the storage location of the definition content.
  • Xxxx is a notation in which a part of the URI is simplified by defining a prefix.
  • the schema information or shape information “xxxx (http: // yyy)” is also simply referred to as “xxxx”.
  • the specific query shown in FIG. 6 is a query that can be issued to an RDF structured document including information to which the schema information “foo: Person” is applied.
  • An RDF structured document that is the target of this specific query is shown in FIG.
  • the RDF structured document in FIG. 7 will be described.
  • This RDF structured document is described in the Turtle language.
  • the resource “ ⁇ alice>” is expressed using schema information “foaf: Person”.
  • the shape information “foaf_shape” is applied to the resource “ ⁇ alice>”.
  • the schema information applied to a certain resource is indicated by the object of the RDF triple that specifies the type of the resource.
  • the shape information applied to a certain resource is indicated by the value of the “instanceShape” attribute of the resource.
  • the specific query in FIG. 6 will be described.
  • This specific query searches the resource to which the schema information “foaf: OnlineAccount” is applied among the resources specified in the value of the “holdsAccount” attribute of the resource to which the schema information “foaf: Person” is applied in FIG. .
  • This specific query extracts the value of the “accountProfilePage” attribute for the retrieved resources whose “accountServiceHomepage” attribute value is “http://twitter.com”.
  • the specific query in FIG. 6 is described in the Diesel language, which is one of the query languages for the RDF structured document.
  • the Diesel language is one of DSL (domain-specific language) that provides a simple description method for the standardized query language SPARQL (SPARQL Protocol and RDF query Language) for RDF structured documents.
  • SPARQL SPARQL Protocol and RDF query Language
  • the abstract query in FIG. 6 will be described.
  • the abstract query “ ⁇ ? Twitter>” abstractly represents the specific query described above. That is, this abstract query abstractly represents a process of extracting a Twitter (registered trademark) account from a structured document.
  • the shape information “foaf_shape” and the schema information “foaf: Person” are stored in the first storage unit 11 in association with each other.
  • the RDF structured document of FIG. 7 includes information to which known schema information is applied.
  • the inference unit 23 acquires the RDF structured document shown in FIG. 9 as the structured document to be processed. (Step S1).
  • the resource “ ⁇ bob>” is expressed using the schema information “my_foaf: Person”.
  • the schema information applied to a certain resource can be acquired from the object of the RDF triple that specifies the type of the resource.
  • the schema information “my_foaf: Person” is not stored in the first storage unit 11 of FIG. 8 or the second storage unit 12 of FIG. 6, and is unknown schema information (in step S2). Yes).
  • the unknown schema information “my_foaf: Person” is actually defined by extending the known schema information “foaf: Person”. However, it is impossible to know from the definition content of the schema information “my_foaf: Person” that it is created by extending “foaf: Person”.
  • the inference unit 23 obtains the shape information “foaf_my_shape” applied to the resource “ ⁇ bob>” to which the unknown schema information is applied (step S3).
  • the shape information applied to a certain resource can be acquired from the value of the “instanceShape” attribute of the resource.
  • the inference unit 23 searches for shape information having an inheritance relationship with respect to the shape information “foaf_my_shape”. Specifically, it is assumed that the inference unit 23 obtains the shape definition content as shown in FIG. 10 by accessing the URI “http://someurl.com/name#foof_my_shape” of the shape information.
  • FIG. 10 shows that the shape information “shape_my_foaf” is defined by inheriting the shape information “foaf_shape”. This can be analyzed by referring to the value of the “extendsShape” attribute in the definition content of the shape.
  • the shape information “foaf_shape” is stored in the first storage unit 11.
  • the inference unit 23 acquires the schema information “foaf: Person” associated with the shape information “foaf_shape” in the first storage unit 11 (step S4).
  • the inference unit 23 determines “foaf: Person” as related schema information for the unknown schema information “foaf_my_shape” (step S5).
  • the inference unit 23 registers the shape information “foaf_my_shape” and the schema information “my_foaf: Person” in the first storage unit 11 in association with each other. In addition, the inference unit 23 registers the shape information “foaf_my_shape” and the related schema information “foaf: Person” in the first storage unit 11 in association with each other (step S11).
  • the query determination unit 24 acquires “ ⁇ ? Twitter>” indicating that the Twitter account is extracted as an abstract query (step S6).
  • the query determination unit 24 searches the second storage unit 12 for a specific query associated with the abstract query “ ⁇ ? Twitter>” and the related schema information “foaf_shape” (step S7).
  • the query determination unit 24 obtains the specific query shown in FIG. 6 as the corresponding specific query (Yes in step S8).
  • the query determining unit 24 registers the schema information “my_foaf: Person”, the abstract query “ ⁇ ? Twitter>”, and the specific query illustrated in FIG. 6 in the second storage unit 12 (step S14). ).
  • the query determination unit 24 determines and issues the searched specific query as a specific query for the RDF structured document of FIG. 9 (step S15).
  • the document processing apparatus can determine a specific query for an unknown document structure, and the unknown document structure is hereinafter referred to as a known document structure. Queries can be determined quickly.
  • the inference unit associates shape information and schema information applied to information included in the structured document to be processed. , Registered in the first storage unit. Further, the inference unit associates the shape information applied to the information included in the structured document to be processed with the determined related schema information and registers them in the first storage unit.
  • the query determination unit issues it to the structured document to be processed. Specific query to be acquired as input. Then, the query determination unit associates the schema information applied to the information included in the structured document to be processed with the input abstract query and the determined specific query, and registers them in the second storage unit. Because.
  • the present embodiment it is possible to process a structured document to be processed later including information to which unknown schema information is applied, as including information to which known schema information is applied. As a result, the present embodiment can determine a specific query more quickly for such a structured document to be processed thereafter.
  • the present embodiment quickly retrieves related schema information for a structured document to be processed later including information to which shape information that has been applied to shape information that has been applied corresponding to unknown schema information is applied. Can be determined. As a result, the present embodiment can determine a specific query more quickly for such a structured document to be processed thereafter.
  • the specific query is associated with the unknown schema information in the structured document to be processed, and the new specific query is additionally registered with the related schema information.
  • a set of schema information and a query is added and accumulated while determining a specific query for a structured document to be processed.
  • a more appropriate query can be determined as a specific query that can be issued to a subsequent structured document to be processed that includes information to which unknown schema information is applied.
  • the present embodiment is not limited to this, and the present embodiment can also be implemented when a plurality of schema information is applied to the information included in the structured document or when a plurality of information to which different schema information is applied is included. . In this case, the present embodiment may operate in the same manner as the present embodiment for each of a plurality of schema information.
  • the structured document is an RDF structured document.
  • the structured document is not limited to this, and may be another type of structured document.
  • this embodiment has the above-described effect particularly when a structured document of a format that can obtain the inheritance relationship of shape information is to be processed. .
  • the document processing device and each functional block thereof may be distributed and realized in a plurality of devices.
  • the operation of the document processing apparatus described with reference to each flowchart may be stored in a computer storage device (storage medium) as a computer program of the present invention. Good. Then, the computer program may be read and executed by the CPU. In such a case, the present invention is constituted by the code of the computer program or a storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Operations Research (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本発明は、未知の文書構造を持つ構造化文書に対して、機械的な処理を可能とする。 第1の記憶部11は、構造化文書に含まれる情報に関するスキーマ情報およびシェイプ情報を関連付けて記憶する。第2の記憶部12は、スキーマ情報と、具体クエリと、抽象クエリとを関連付けて記憶する。推論部13は、対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合、第1の記憶部11において該情報に適用されたシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、関連スキーマ情報として決定する。クエリ決定部14は、第2の記憶部12において、入力された抽象クエリと、関連スキーマ情報とに関連付けられた具体クエリを、処理対象の構造化文書に対する具体クエリとして決定する。

Description

文書処理装置、方法および記憶媒体
 本発明は、構造化文書を処理する技術に関する。
 組織内または組織間でやりとりされる文書は、一般に、共通化された書式で記述されていることが望ましい。特に、そのような文書が機械的に処理される場合、その文書のコンテンツから必要な情報を抽出するためには、文書の構造を知ることが重要となる。文書を機械的に処理するためのソフトウェアでは、どのような構造の文書が入力されるかが設計時に特定され、特定された構造に適したロジックが構築される。
 機械的処理に適した文書構造としては、さまざまなものが提案されている。その最たるものとして、XML(Extensible Markup Language)文書がある。XML文書の構造が既知であれば、その読み書きを機械的に処理することは容易である。また、近年、リンクドデータ(Linked data)の活用が盛んになっている。リンクドデータは、RDF(Resource Description Framework)構造で記述されていることが多い。XML文書やリンクドデータは、いずれもシンタックスとして矛盾しない限り、利用者によって自由な構造に拡張されることが許されている。しかし、既存の構造を持つ文書に対する処理を行うソフトウェアは、利用者により自由に拡張された構造を持つ文書を正しく処理できないことがある。これは、当該ソフトウェアが設計された段階では、そのような拡張された構造が入力されることは想定されていないためである。そこで、利用者による拡張を制限することが考えられる。しかし、標準化団体で提唱される基本的な構造を用いて、様々な組織文化や様々なビジネスプロセスにおいて用いられる情報を表す場合、表現能力が不足する。
 このような問題に対応するため、標準化団体で提唱される標準を拡張して組織毎に独自に文書処理の標準化を行うことが、往々にして行なわれる。この組織標準というべき標準を逸脱しない範囲において、ソフトウェアによる機械的文書処理は十全に機能する。すなわち、組織標準によって、組織内における文書の相互運用が可能となる。
 また、このような問題に関連する技術の一例が、特許文献1に記載されている。特許文献1に記載された関連技術は、データベースに記憶されている複数の構造化文書の中から、キーワードに関連する文書構造を検索して出力する。構造化文書の作成者は、この関連技術を用いて、自身が作成する文書に対して内容的に類似する文書構造を検索し、検索した文書構造を利用して構造化文書を作成することができる。その結果、この関連技術は、様々な文書構造の氾濫を抑える。
特開2004-126640号公報
 しかしながら、上述した組織標準および関連技術には、以下の課題がある。
 組織標準は、組織内における文書の相互運用を可能とするが、組織間での文書の相互運用性を確保することは難しい。これは、通常、組織によって異なる組織標準が存在すると考えられるためである。このため、ある組織における組織標準に基づく文書構造を処理するソフトウェアは、他の組織で用いられる組織標準に基づく未知の文書構造に対して、機械的処理を行うことができない。特に、相互運用が必要となる対象組織が変わることを考慮したとき、この問題は顕著となる。
 また、特許文献1に記載された関連技術は、構造化文書の作成者が、同一のデータベースから所望の文書構造を検索することを想定している。しかしながら、異なる組織における構造化文書の作成者は、作成したい文書の文書構造を同一のデータベースから検索するとは限らない。このため、ある組織においてこの関連技術を用いて作成された文書構造を処理するソフトウェアは、他の組織において作成された未知の文書構造に対して、機械的処理を行うことができない。特に、相互運用が必要となる対象組織が変わることを考慮したとき、この問題は顕著となる。
 本発明は、上述の課題を解決するためになされたものである。すなわち、本発明は、未知の文書構造を持つ構造化文書に対して、機械的な処理を可能とする技術を提供することを目的とする。
 上記目的を達成するために、本発明の文書処理装置は、構造化文書に含まれる情報の構造を表すスキーマを識別するスキーマ情報、および、前記情報に関する制約を表すシェイプを識別するシェイプ情報を関連付けて記憶する第1の記憶手段と、前記スキーマ情報と、前記スキーマ情報が表す構造を持つ情報を含む構造化文書に対して発行可能なクエリを表す具体クエリと、前記具体クエリを抽象的に表した抽象クエリとを関連付けて記憶する第2の記憶手段と、処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、前記第1の記憶手段において、前記情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、前記未知のスキーマ情報に関連性のある関連スキーマ情報として決定する推論手段と、前記第2の記憶手段において、前記処理対象の構造化文書について入力された抽象クエリと、前記関連スキーマ情報とに関連付けられた具体クエリを、前記処理対象の構造化文書に対して発行する具体クエリとして決定するクエリ決定手段と、を備える。
 また、本発明の方法は、コンピュータ装置が、構造化文書に含まれる情報の構造を表すスキーマを識別するスキーマ情報、および、前記情報に関する制約を表すシェイプを識別するシェイプ情報を関連付けて記憶する第1の記憶手段と、前記スキーマ情報と、前記スキーマ情報が表す構造を持つ情報を含む構造化文書に対して発行可能なクエリを表す具体クエリと、前記具体クエリを抽象的に表した抽象クエリとを関連付けて記憶する第2の記憶手段とを用いて、処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、前記第1の記憶手段において、前記情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、前記未知のスキーマ情報に関連性のある関連スキーマ情報として決定し、前記第2の記憶手段において、前記処理対象の構造化文書について入力された抽象クエリと、前記関連スキーマ情報とに関連付けられた具体クエリを、前記処理対象の構造化文書に対して発行する具体クエリとして決定する。
 また、本発明の記憶媒体は、構造化文書に含まれる情報の構造を表すスキーマを識別するスキーマ情報、および、前記情報に関する制約を表すシェイプを識別するシェイプ情報を関連付けて記憶する第1の記憶手段と、前記スキーマ情報と、前記スキーマ情報が表す構造を持つ情報を含む構造化文書に対して発行可能なクエリを表す具体クエリと、前記具体クエリを抽象的に表した抽象クエリとを関連付けて記憶する第2の記憶手段とを用いて、処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、前記第1の記憶手段において、前記情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、前記未知のスキーマ情報に関連性のある関連スキーマ情報として決定する継承関係推論ステップと、前記第2の記憶手段において、前記処理対象の構造化文書について入力された抽象クエリと、前記関連スキーマ情報とに関連付けられた具体クエリを、前記処理対象の構造化文書に対して発行する具体クエリとして決定するクエリ決定ステップと、をコンピュータ装置に実行させるプログラムを記憶している。
 本発明は、未知の文書構造を持つ構造化文書に対して、機械的な処理を可能とする技術を提供することができる。
本発明の第1の実施の形態としての文書処理装置の構成を示すブロック図である。 本発明の第1の実施の形態としての文書処理装置のハードウェア構成の一例を示す図である。 本発明の第1の実施の形態としての文書処理装置の動作を説明するフローチャートである。 本発明の第2の実施の形態としての文書処理装置の構成を示すブロック図である。 本発明の第2の実施の形態としての文書処理装置の動作を説明するフローチャートである。 本発明の第2の実施の形態において第2の記憶部に記憶される情報の一例を示す図である。 本発明の第2の実施の形態において既知のスキーマ情報が適用された情報を含む構造化文書の一例を示す図である。 本発明の第2の実施の形態において第1の記憶部に記憶される情報の一例を示す図である。 本発明の第2の実施の形態において未知のスキーマ情報が適用された情報を含む構造化文書の一例を示す図である。 本発明の第2の実施の形態におけるシェイプの定義内容の一例を示す図である。
 以下、本発明の実施の形態について、図面を参照して詳細に説明する。
 (第1の実施の形態)
 本発明の第1の実施の形態としての文書処理装置1の機能ブロック構成を図1に示す。図1において、文書処理装置1は、第1の記憶部11と、第2の記憶部12と、推論部13と、クエリ決定部14とを備える。
 ここで、文書処理装置1は、構造化文書を処理することができる情報処理装置であり、図2に示すようなハードウェア要素によって構成可能である。図2において、文書処理装置1は、CPU(Central Processing Unit)1001、メモリ1002、出力装置1003、入力装置1004、および、ネットワークインタフェース1005を含む。メモリ1002は、RAM(Random Access Memory)、ROM(Read Only Memory)、補助記憶装置(ハードディスク等)等によって構成される。出力装置1003は、ディスプレイ装置やプリンタ等のように、情報を出力する装置によって構成される。入力装置1004は、キーボードやマウス等のように、ユーザ操作の入力を受け付ける装置によって構成される。ネットワークインタフェース1005は、インターネット、有線LAN(Local Area Network)、無線LAN、公衆回線網、モバイルデータ通信網またはこれらの組合せ等によって構成されるネットワークに接続するインタフェースである。この場合、第1の記憶部11および第2の記憶部12は、メモリ1002によって構成される。また、推論部13は、ネットワークインタフェース1005と、メモリ1002に格納されるコンピュータ・プログラムを読み込んで実行するCPU1001とによって構成される。また、クエリ決定部14は、入力装置1004と、メモリ1002に格納されるコンピュータ・プログラムを読み込んで実行するCPU1001とによって構成される。なお、文書処理装置1およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
 次に、各機能ブロックについて説明する。
 第1の記憶部11は、スキーマ情報およびシェイプ情報を関連付けて記憶している。
 ここで、スキーマとは、構造化文書に含まれる情報の構造を表す。また、スキーマ情報とは、そのようなスキーマを識別する情報である。例えば、RDF構造化文書の場合、スキーマを識別するスキーマ情報は、URI(Uniform Resource Identifier)で表される。また、このURIには、スキーマの定義内容が格納される。以降、ある情報の構造を表すスキーマを識別するスキーマ情報を、その情報に適用されているスキーマ情報、とも記載する。
 また、シェイプとは、構造化文書に含まれる情報に関する制約を表す。また、シェイプ情報とは、そのようなシェイプを識別する情報である。例えば、RDF構造化文書の場合、シェイプを識別するシェイプ情報は、URIで表される。また、このURIには、シェイプの定義内容が格納される。以降、ある情報の制約を表すシェイプを識別するシェイプ情報を、その情報に適用されているシェイプ情報、とも記載する。
 ここで、シェイプは、そのシェイプ情報が適用される情報の構成要素に対して定義される。したがって、シェイプ情報と、そのシェイプ情報が適用される情報に適用されるスキーマ情報との間は、関連付けが可能である。なお、第1の記憶部11は、例えば、あらかじめ管理者等によって入力装置1004を介して入力されたシェイプ情報およびスキーマ情報の組を、関連付けて記憶してもよい。
 第2の記憶部12は、スキーマ情報と、具体クエリと、抽象クエリとを関連付けて記憶している。ここで、具体クエリとは、構造化文書に対して発行可能なクエリを表す。例えば、具体クエリは、構造化文書から所望の情報を抽出する処理を表すものであってもよい。また、具体クエリは、構造化文書に所望の情報を登録・更新する処理を表すものであってもよい。また、抽象クエリとは、具体クエリを抽象的に表したクエリである。
 ここで、構造化文書では、スキーマ情報が表すスキーマに応じて、そのスキーマ情報が適用された情報に対して発行可能な具体クエリが表現される。したがって、スキーマ情報と、そのスキーマ情報が適用された情報に対して発行可能な具体クエリと、その抽象クエリとの間は、関連付けが可能である。なお、第2の記憶部12は、例えば、あらかじめ管理者等によって入力装置1004を介して入力されたスキーマ情報、具体クエリおよび抽象クエリの組を、関連付けて記憶してもよい。
 推論部13は、処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、該情報に適用されているシェイプ情報の継承関係に基づいて、未知のスキーマ情報に対する関連スキーマ情報を決定する。
 ここで、未知のスキーマ情報とは、そのスキーマ情報が適用されている情報に対する具体クエリが不明であることをいう。また、関連スキーマ情報とは、未知のスキーマ情報に対して少なくとも部分的に構造が一致する可能性があるスキーマ情報をいうものとする。関連スキーマ情報に対して発行可能な具体クエリは、未知のスキーマ情報に対して発行可能である可能性が高い。
 詳細には、推論部13は、処理対象の構造化文書に含まれる情報に適用されているスキーマ情報が未知であるか既知であるかを判断する。本実施の形態では、スキーマ情報が未知であるか既知であるかは、そのスキーマ情報が、第1の記憶部11または第2の記憶部12に記憶されているか否かによって判断可能である。なお、処理対象の構造化文書に含まれる情報に適用されているスキーマ情報は、処理対象の構造化文書の内容を解析することにより取得可能である。
 また、詳細には、推論部13は、処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、処理対象の構造化文書に含まれる情報に適用されているシェイプ情報を特定する。なお、処理対象の構造化文書に含まれる情報に適用されているシェイプ情報は、処理対象の構造化文書の内容を解析することにより取得可能である。
 また、推論部13は、特定したシェイプ情報に対して継承関係を持つシェイプ情報を取得する。ここで、継承関係を持つとは、例えば、該当するシェイプ情報の定義において親または先祖として用いられていることをいう。構造化文書に含まれる情報に関するシェイプ情報の継承関係は、そのシェイプ情報の定義内容に基づき取得可能である。また、そのようなシェイプ情報の定義内容の格納場所は、構造化文書の内容を解析することにより取得可能である。もし、該当するシェイプ情報の定義内容の格納場所がネットワーク上の場所を示す場合、推論部13は、ネットワークインタフェース1005を介してその格納場所にアクセスすればよい。
 また、推論部13は、第1の記憶部11において、処理対象の構造化文書に含まれる情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、関連スキーマ情報として決定する。なお、該当するシェイプ情報の親となるシェイプ情報が、第1の記憶部11に記憶されていないケースも考えられる。この場合、推論部13は、第1の記憶部11に記憶されたシェイプ情報が得られるまで、さらにその親となるシェイプ情報を取得する処理を繰り返せばよい。
 クエリ決定部14は、処理対象の構造化文書に含まれる情報に対する抽象クエリを入力として取得する。例えば、抽象クエリは、入力装置1004を介して入力されてもよい。そして、クエリ決定部14は、第2の記憶部12において、入力された抽象クエリと、関連スキーマ情報とに関連付けられた具体クエリを取得する。そして、クエリ決定部14は、取得した具体クエリを、処理対象の構造化文書に対して発行する具体クエリとして決定する。そして、クエリ決定部14は、処理対象の構造化文書に対して、決定した具体クエリを発行してもよい。
 以上のように構成された文書処理装置1の動作について、図3を参照して説明する。
 図3では、まず、推論部13は、処理対象の構造化文書を取得する(ステップS1)。
 次に、推論部13は、処理対象の構造化文書に含まれる情報に、未知のスキーマ情報が適用されているか否かを判断する(ステップS2)。前述のように、推論部13は、該当するスキーマ情報が、第1の記憶部11または第2の記憶部12に記憶されていなければ未知であると判断し、記憶されていれば未知でない(既知である)と判断すればよい。
 ここで、該当するスキーマ情報が未知でない(既知である)場合、文書処理装置1の動作は、ステップS6に進む。
 一方、該当するスキーマ情報が未知である場合、推論部13は、処理対象の構造化文書に含まれる情報に適用されているシェイプ情報を特定する(ステップS3)。
 次に、推論部13は、第1の記憶部11において、ステップS3で特定されたシェイプ情報に対して継承関係を持つシェイプ情報を検索する(ステップS4)。
 例えば、前述のように、推論部13は、取得されたシェイプ情報の定義内容を参照することにより、その親となるシェイプ情報を特定する。そして、推論部13は、第1の記憶部11において、親となるシェイプ情報を検索する。このとき、親となるシェイプ情報が第1の記憶部11に記憶されていなければ、推論部13は、親となるシェイプ情報の定義内容を参照することにより、さらにその親となるシェイプ情報を取得する。このように、推論部13は、第1の記憶部11に記憶されているシェイプ情報が得られるまで、親となるシェイプ情報を取得することを繰り返す。
 次に、推論部13は、第1の記憶部11において、継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、未知のスキーマ情報の関連スキーマ情報として決定する(ステップS5)。
 次に、クエリ決定部14は、処理対象の構造化文書に含まれる情報に対する抽象クエリを、入力として取得する(ステップS6)。
 次に、クエリ決定部14は、第2の記憶部12において、入力された抽象クエリと、関連スキーマ情報または既知のスキーマ情報とに関連付けられた具体クエリを検索する(ステップS7)。ここで、関連スキーマ情報は、ステップS5で決定された関連スキーマ情報である。また、既知のスキーマ情報は、ステップS2で既知であると判断された場合のスキーマ情報である。
 ここで、第2の記憶部12から該当する具体クエリが検索できなかった場合(ステップS8でNo)、クエリ決定部14は、エラー情報を出力する(ステップS9)。
 一方、第2の記憶部12から該当する具体クエリが検索された場合(ステップS8でYes)、クエリ決定部14は、検索された具体クエリを、処理対象の構造化文書に対して発行する具体クエリとして決定する(ステップS10)。
 以上で、文書処理装置1は動作を終了する。
 次に、本発明の第1の実施の形態の効果について述べる。
 本発明の第1の実施の形態としての文書処理装置は、未知の文書構造を持つ構造化文書に対して、機械的な処理を可能とする。
 その理由について説明する。本実施の形態では、第1の記憶部が、構造化文書に含まれる情報の構造を表すスキーマを識別するスキーマ情報、および、情報に関する制約を表すシェイプを識別するシェイプ情報を関連付けて記憶している。また、第2の記憶部が、スキーマ情報と、スキーマ情報に基づく情報を含む構造化文書に対して発行可能なクエリを表す具体クエリと、その具体クエリを抽象的に表した抽象クエリとを関連付けて記憶している。そして、推論部が、処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、その情報に適用されているシェイプ情報を特定する。そして、推論部が、第1の記憶部において、その情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、関連スキーマ情報として決定する。そして、クエリ決定部には、処理対象の構造化文書に対する抽象クエリが入力される。すると、クエリ決定部が、第2の記憶部において、入力された抽象クエリと関連スキーマ情報とに関連付けられた具体クエリを、処理対象の構造化文書に対して発行する具体クエリとして決定するからである。
 このように、本実施の形態では、シェイプ情報の継承関係を用いて、未知のスキーマ情報に対して関連性がある既知のスキーマ情報を決定することができる。関連性があるとして決定された既知のスキーマ情報は、未知のスキーマ情報に対して部分的に一致する構造を有する可能性が高い。このため、本実施の形態は、未知のスキーマ情報が適用された情報を含む構造化文書に対して、関連性がある既知のスキーマ情報に関連付けて蓄積された具体クエリを発行することができる。その結果、本実施の形態は、未知のスキーマ情報が適用された情報を含む構造化文書に対して、データの抽出や登録といった処理を、新たにソフトウェアを設計することなく、行うことができる。
 (第2の実施の形態)
 次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。なお、本実施の形態の説明において参照する各図面において、本発明の第1の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して本実施の形態における詳細な説明を省略する。
 まず、本発明の第2の実施の形態としての文書処理装置2の構成を図4に示す。図4において、文書処理装置2は、本発明の第1の実施の形態としての文書処理装置1に対して、推論部13に替えて推論部23と、クエリ決定部14に替えてクエリ決定部24とを備える点が異なる。
 ここで、文書処理装置2およびその各機能ブロックは、図2を参照して説明した本発明の第1の実施の形態のハードウェア要素によって構成可能である。ただし、文書処理装置2およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
 推論部23は、本発明の第1の実施の形態における推論部13と同様に構成されることに加えて、次のように構成される。すなわち、推論部23は、処理対象の構造化文書に含まれる情報に適用されているシェイプ情報と、該情報に適用されているスキーマ情報とを関連付けて、第1の記憶部11に登録する。なお、登録するとは、第1の記憶部11に記憶させることをいう。これにより、処理対象の構造化文書において未知だったスキーマ情報は、シェイプ情報と関連付けられた既知のスキーマ情報となる。
 また、推論部23は、関連スキーマ情報が決定された処理対象の構造化文書に含まれる情報に適用されているシェイプ情報と、関連スキーマ情報とを関連付けて、第1の記憶部11に登録する。これにより、推論部23は、以降の処理対象の構造化文書において未知のスキーマ情報が適用されている情報に、今回のシェイプ情報を継承したシェイプ情報が適用されていれば、迅速に関連スキーマ情報を取得可能となる。
 なお、この場合、第1の記憶部11には、同一のシェイプ情報について、異なるスキーマ情報が関連付けられた複数の登録が記憶されるケースが発生する。すなわち、異なるスキーマ情報の一方は、今回の処理対象の構造化文書に含まれる情報に適用されていた未知だったスキーマ情報であり、他方は、未知だったスキーマ情報に対する関連スキーマ情報として決定されたスキーマ情報である。このような場合、推論部23は、以降の処理対象の構造化文書に含まれる情報に、該当するシェイプ情報が適用されている場合、その関連スキーマ情報として、複数のスキーマ情報のいずれかを決定してもよい。あるいは、推論部23は、以降の処理対象の構造化文書に含まれる情報に、該当するシェイプ情報が適用されている場合、その関連スキーマ情報として、複数のスキーマ情報を決定してもよい。そして、その場合、クエリ決定部24は、関連スキーマ情報のそれぞれを用いて、第2の記憶部12から具体クエリを検索し、そのうち適切な具体クエリを選択すればよい。
 クエリ決定部24は、本発明の第1の実施の形態におけるクエリ決定部14と同様に構成されることに加えて、次のように構成される。ここで、第2の記憶部12において、処理対象の構造化文書に含まれる情報について入力された抽象クエリと、関連スキーマ情報とに関連付けられた具体クエリが記憶されていない場合がある。このような場合に、クエリ決定部24は、外部から入力された具体クエリを、処理対象の構造化文書に対して発行する具体クエリとして決定する。この場合、具体クエリは、例えば、入力装置1004を介して入力される。
 また、クエリ決定部24は、処理対象の構造化文書に含まれる情報に対して決定した具体クエリと、該情報に適用されているスキーマ情報と、該情報について入力された抽象クエリとを、関連付けて第2の記憶部12に登録する。なお、登録するとは、第2の記憶部12に記憶させることをいう。これにより、もし、該情報に未知のスキーマ情報が適用されていた場合には、クエリ決定部24は、未知だったスキーマ情報を既知として、抽象クエリおよび具体クエリを蓄積できる。また、もし、該情報に既知のスキーマ情報が適用されていた場合には、クエリ決定部24は、既知のスキーマ情報に対して、それまで蓄積されていなかった抽象クエリおよび具体クエリを、追加して蓄積できる。
 以上のように構成された文書処理装置2の動作について、図5を参照して説明する。
 図5では、まず、文書処理装置2は、ステップS1~S5まで、本発明の第1の実施の形態と同様に動作して、未知のスキーマ情報の関連スキーマ情報を決定する。
 次に、推論部23は、処理対象の構造化文書に含まれる情報について、該情報に適用されているシェイプ情報と、該情報に適用されているスキーマ情報とを関連付けて、第1の記憶部11に登録する。また、推論部23は、該情報に適用されているシェイプ情報と、決定された関連スキーマ情報とを関連付けて、第1の記憶部11に登録する(ステップS11)。
 次に、文書処理装置2は、ステップS6~S7まで、本発明の第1の実施の形態と同様に動作して、入力された抽象クエリと、関連スキーマ情報または既知のスキーマ情報とに関連付けられた具体クエリを検索する。
 ここで、そのような具体クエリが得られなかった場合(ステップS8でNo)、クエリ決定部24は、処理対象の構造化文書に含まれる情報に対する具体クエリを、入力として取得する(ステップS13)。
 そして、クエリ決定部24は、入力された具体クエリと、該情報に適用されているスキーマ情報と、ステップS6で入力された抽象クエリとを関連付けて、第2の記憶部12に登録する(ステップS14)。
 一方、該当する具体クエリが得られた場合(ステップS8でYes)、クエリ決定部24は、ステップS14を実行する。すなわち、クエリ決定部24は、得られた具体クエリと、該情報に適用されているスキーマ情報と、ステップS6で入力された抽象クエリとを関連付けて、第2の記憶部12に登録する(ステップS14)。
 次に、クエリ決定部24は、ステップS7で得られた具体クエリまたはステップS13で入力された具体クエリを、処理対象の構造化文書に対して発行する具体クエリとして決定する(ステップS15)。
 以上で、文書処理装置2は、動作を終了する。
 次に、文書処理装置2の動作を具体例で示す。
 この具体例では、第2の記憶部12に、図6に示すように、スキーマ情報と、抽象クエリと、具体クエリとが関連付けられて記憶されている。
 なお、図6以降の図面および以下の説明において、「xxxx(http://yyyy)」は、()内に記述されたURIによりスキーマまたはシェイプを識別するスキーマ情報またはシェイプ情報を表す。また、このURIは、スキーマまたはシェイプを識別することに加えて、その定義内容の格納場所を表している。また、「xxxx」は、そのURIの一部をプレフィックスの定義により簡略化した表記である。また、スキーマ情報またはシェイプ情報「xxxx(http://yyyy)」を、単に「xxxx」とも記載する。
 図6に示す具体クエリは、スキーマ情報「foaf:Person」が適用された情報を含むRDF構造化文書に対して発行可能なクエリである。この具体クエリの対象となるRDF構造化文書の具体例を図7に示す。
 図7のRDF構造化文書について説明する。このRDF構造化文書は、Turtle言語で記述されている。図7では、リソース「<alice>」が、スキーマ情報「foaf:Person」を用いて表現されている。また、リソース「<alice>」には、シェイプ情報「foaf_shape」が適用されている。なお、あるリソースに適用されているスキーマ情報は、そのリソースのタイプを指定しているRDFトリプルの目的語によって示されている。また、あるリソースに適用されているシェイプ情報は、そのリソースの「instanceShape」属性の値によって示されている。
 図6の具体クエリについて説明する。この具体クエリは、図7においてスキーマ情報「foaf:Person」が適用されたリソースの「holdsAccount」属性の値に指定されたリソースのうち、スキーマ情報「foaf:OnlineAccount」が適用されたリソースを検索する。そして、この具体クエリは、検索したリソースのうち、「accountServiceHomepage」属性の値が「http://twitter.com」であるものについて、「accountProfilePage」属性の値を抽出する。なお、図6の具体クエリは、RDF構造化文書に対するクエリ言語の1つであるDiesel言語によって記述されている。Diesel言語は、RDF構造化文書に対する標準化されたクエリ言語SPARQL(SPARQL Protocol and RDF query Language)について、簡易な記述方法を提供するDSL(domain-specific language)の1つである。
 また、図6の抽象クエリについて説明する。この抽象クエリ「<?twitter>」は、上述した具体クエリを抽象的に表している。つまり、この抽象クエリは、構造化文書から、twitter(登録商標)のアカウントを抽出する処理を抽象的に表している。
 また、この具体例では、第1の記憶部11に、図8に示すように、シェイプ情報「foaf_shape」およびスキーマ情報「foaf:Person」が関連付けられて記憶されている。
 このように、図7のRDF構造化文書は、既知のスキーマ情報が適用された情報を含んでいる。
 上述した情報が、第1の記憶部11および第2の記憶部12に記憶されている状態で、推論部23は、処理対象の構造化文書として、図9に示すRDF構造化文書を取得したとする(ステップS1)。
 図9では、リソース「<bob>」が、スキーマ情報「my_foaf:Person」を用いて表現されている。前述したように、あるリソースに適用されているスキーマ情報は、そのリソースのタイプを指定しているRDFトリプルの目的語から取得可能である。ここで、スキーマ情報「my_foaf:Person」は、図8の第1の記憶部11にも図6の第2の記憶部12にも記憶されておらず、未知のスキーマ情報である(ステップS2でYes)。
 ここで、この未知のスキーマ情報「my_foaf:Person」は、実際には、既知のスキーマ情報「foaf:Person」を拡張して定義されたものである。ところが、スキーマ情報「my_foaf:Person」の定義内容からは、「foaf:Person」を拡張して作成されたものであることを知ることはできない。
 そこで、推論部23は、未知のスキーマ情報が適用されたリソース「<bob>」に適用されているシェイプ情報「foaf_my_shape」を取得する(ステップS3)。前述したように、あるリソースに適用されているシェイプ情報は、そのリソースの「instanceShape」属性の値から取得可能である。
 次に、推論部23は、このシェイプ情報「foaf_my_shape」に対して、継承関係を持つシェイプ情報を検索する。具体的には、推論部23は、このシェイプ情報のURI「http://someurl.com/name#foaf_my_shape」にアクセスすることにより、図10に示すようなシェイプの定義内容を取得したとする。
 図10によれば、シェイプ情報「shape_my_foaf」は、シェイプ情報「foaf_shape」を継承して定義されていることがわかる。このことは、シェイプの定義内容における「extendsShape」属性の値を参照することにより解析可能である。また、このシェイプ情報「foaf_shape」は、第1の記憶部11に記憶されている。
 そこで、推論部23は、第1の記憶部11において、このシェイプ情報「foaf_shape」に関連付けられたスキーマ情報「foaf:Person」を取得する(ステップS4)。
 そして、推論部23は、未知のスキーマ情報「foaf_my_shape」に対する関連スキーマ情報として「foaf:Person」を決定する(ステップS5)。
 次に、推論部23は、第1の記憶部11に、シェイプ情報「foaf_my_shape」と、スキーマ情報「my_foaf:Person」とを関連付けて登録する。また、推論部23は、第1の記憶部11に、シェイプ情報「foaf_my_shape」と、関連スキーマ情報「foaf:Person」とを関連付けて登録する(ステップS11)。
 次に、クエリ決定部24は、抽象クエリとして、twitterのアカウントを抽出することを表す「<?twitter>」を取得する(ステップS6)。
 次に、クエリ決定部24は、第2の記憶部12において、抽象クエリ「<?twitter>」と、関連スキーマ情報「foaf_shape」とに関連付けられた具体クエリを検索する(ステップS7)。
 ここで、第2の記憶部12には、図6に示した情報が記憶されている。そこで、クエリ決定部24は、該当する具体クエリとして、図6に示した具体クエリを得る(ステップS8でYes)。
 そして、クエリ決定部24は、スキーマ情報「my_foaf:Person」と、抽象クエリ「<?twitter>」と、図6に示した具体クエリとを関連付けて第2の記憶部12に登録する(ステップS14)。
 最後に、クエリ決定部24は、検索した具体クエリを、図9のRDF構造化文書に対する具体クエリとして決定し、発行する(ステップS15)。
 以上で、文書処理装置2の具体的な動作の説明を終了する。
 次に、本発明の第2の実施の形態の効果について述べる。
 本発明の第2の実施の形態としての文書処理装置は、未知の文書構造について具体クエリを決定することができ、さらに、未知であった文書構造を、以降、既知の文書構造として、その具体クエリを迅速に決定することができる。
 その理由について説明する。本実施の形態では、本発明の第1の実施の形態と同様の構成に加えて、推論部が、処理対象の構造化文書に含まれる情報に適用されているシェイプ情報およびスキーマ情報を関連付けて、第1の記憶部に登録する。また、推論部が、処理対象の構造化文書に含まれる情報に適用されているシェイプ情報と、決定した関連スキーマ情報とを関連付けて、第1の記憶部に登録する。また、第2の記憶部に、入力された抽象クエリと、関連スキーマ情報とに関連付けられた具体クエリが記憶されていない場合には、クエリ決定部が、処理対象の構造化文書に対して発行する具体クエリを、入力として取得する。そして、クエリ決定部が、処理対象の構造化文書に含まれる情報に適用されているスキーマ情報と、入力された抽象クエリおよび決定された具体クエリとを関連付けて、第2の記憶部に登録するからである。
 これにより、本実施の形態は、未知だったスキーマ情報が適用された情報を含む以降の処理対象の構造化文書について、既知のスキーマ情報が適用された情報を含むものとして処理できる。その結果、本実施の形態は、そのような以降の処理対象の構造化文書について、より迅速に具体クエリを決定できる。
 また、本実施の形態は、未知だったスキーマ情報に対応して適用されていたシェイプ情報を継承したシェイプ情報が適用された情報を含む以降の処理対象の構造化文書について、関連スキーマ情報を迅速に決定できる。その結果、本実施の形態は、そのような以降の処理対象の構造化文書について、より迅速に具体クエリを決定できる。
 また、本実施の形態は、処理対象の構造化文書において未知だったスキーマ情報についてその具体クエリを関連付けて登録するとともに、既知のスキーマ情報についても新たな具体クエリを関連付けて追加登録することになる。このように、本実施の形態は、処理対象の構造化文書について具体クエリを決定しながら、スキーマ情報およびクエリの組を追加して蓄積していく。その結果、本実施の形態は、未知のスキーマ情報が適用された情報を含む以降の処理対象の構造化文書に対して発行可能な具体クエリとして、より適切なクエリを決定できる。
 なお、上述した本発明の各実施の形態において、構造化文書に含まれる情報に適用されるスキーマ情報が1つである例を中心に説明した。これに限らず、本実施の形態は、構造化文書に含まれる情報に複数のスキーマ情報が適用される場合や、異なるスキーマ情報が適用された複数の情報が含まれる場合にも実施可能である。その場合、本実施の形態は、複数のスキーマ情報のそれぞれについて、本実施の形態と同様に動作すればよい。
 また、上述した本発明の各実施の形態において、構造化文書がRDF構造化文書である例について説明した。これに限らず、構造化文書は、その他の形式の構造化文書であってもよい。なお、本実施の形態は、スキーマ情報の継承関係を得ることは難しいが、シェイプ情報の継承関係を得ることが可能な形式の構造化文書を処理対象とする場合に、特に上述の効果を奏する。
 また、上述した本発明の各実施の形態において、RDF構造化文書およびその具体クエリが、特定の言語により記述された例を示した。これに限らず、構造化文書として、他の言語により記述されたRDF構造化文書および具体クエリを採用してもよい。
 また、上述した本発明の各実施の形態において、文書処理装置およびその各機能ブロックは、複数の装置に分散されて実現されてもよい。
 また、上述した本発明の各実施の形態において、各フローチャートを参照して説明した文書処理装置の動作を、本発明のコンピュータ・プログラムとしてコンピュータの記憶装置(記憶媒体)に格納しておいてもよい。そして、係るコンピュータ・プログラムを当該CPUが読み出して実行するようにしてもよい。そして、このような場合において、本発明は、係るコンピュータ・プログラムのコードあるいは記憶媒体によって構成される。
 また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。
 以上、上述した各実施の形態を模範的な例として本発明を説明した。しかしながら、本発明は、上述した各実施の形態には限定されない。即ち、本発明は、本発明のスコープ内において、当業者が理解し得る様々な態様を適用することができる。
 この出願は、2015年12月8日に出願された日本出願特願2015-239089を基礎とする優先権を主張し、その開示の全てをここに取り込む。
 1、2  文書処理装置
 11  第1の記憶部
 12  第2の記憶部
 13、23  推論部
 14、24  クエリ決定部
 1001  CPU
 1002  メモリ
 1003  出力装置
 1004  入力装置
 1005  ネットワークインタフェース

Claims (8)

  1.  構造化文書に含まれる情報の構造を表すスキーマを識別するスキーマ情報、および、前記情報に関する制約を表すシェイプを識別するシェイプ情報を関連付けて記憶する第1の記憶手段と、
     前記スキーマ情報と、前記スキーマ情報が表す構造を持つ情報を含む構造化文書に対して発行可能なクエリを表す具体クエリと、前記具体クエリを抽象的に表した抽象クエリとを関連付けて記憶する第2の記憶手段と、
     処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、前記第1の記憶手段において、前記情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、前記未知のスキーマ情報に関連性のある関連スキーマ情報として決定する推論手段と、
     前記第2の記憶手段において、前記処理対象の構造化文書について入力された抽象クエリと、前記関連スキーマ情報とに関連付けられた具体クエリを、前記処理対象の構造化文書に対して発行する具体クエリとして決定するクエリ決定手段と、
     を備えた文書処理装置。
  2.  前記推論手段は、前記処理対象の構造化文書に含まれる情報に適用されているシェイプ情報と、該情報に適用されているスキーマ情報とを関連付けて、前記第1の記憶手段に登録することを特徴とする請求項1に記載の文書処理装置。
  3.  前記推論手段は、前記処理対象の構造化文書に含まれる情報に適用されているシェイプ情報と、前記関連スキーマ情報とを関連付けて、前記第1の記憶手段に登録することを特徴とする請求項1または請求項2に記載の文書処理装置。
  4.  前記クエリ決定手段は、前記第2の記憶手段において、前記処理対象の構造化文書について入力された抽象クエリと、前記関連スキーマ情報とに関連付けられた具体クエリを取得できない場合、外部から入力された具体クエリを、前記処理対象の構造化文書に対して発行する具体クエリとして決定することを特徴とする請求項1から請求項3のいずれか1項に記載の文書処理装置。
  5.  前記クエリ決定手段は、前記処理対象の構造化文書に対して決定した具体クエリと、該情報に適用されているスキーマ情報と、該情報について入力された抽象クエリとを関連付けて、前記第2の記憶手段に登録することを特徴とする請求項1から請求項4のいずれか1項に記載の文書処理装置。
  6.  前記構造化文書としてRDF(Resource Description Framework)文書を適用することを特徴とする請求項1から請求項5のいずれか1項に記載の文書処理装置。
  7.  コンピュータ装置が、
     構造化文書に含まれる情報の構造を表すスキーマを識別するスキーマ情報、および、前記情報に関する制約を表すシェイプを識別するシェイプ情報を関連付けて記憶する第1の記憶手段と、
     前記スキーマ情報と、前記スキーマ情報が表す構造を持つ情報を含む構造化文書に対して発行可能なクエリを表す具体クエリと、前記具体クエリを抽象的に表した抽象クエリとを関連付けて記憶する第2の記憶手段とを用いて、
     処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、前記第1の記憶手段において、前記情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、前記未知のスキーマ情報に関連性のある関連スキーマ情報として決定し、
     前記第2の記憶手段において、前記処理対象の構造化文書について入力された抽象クエリと、前記関連スキーマ情報とに関連付けられた具体クエリを、前記処理対象の構造化文書に対して発行する具体クエリとして決定する方法。
  8.  構造化文書に含まれる情報の構造を表すスキーマを識別するスキーマ情報、および、前記情報に関する制約を表すシェイプを識別するシェイプ情報を関連付けて記憶する第1の記憶手段と、
     前記スキーマ情報と、前記スキーマ情報が表す構造を持つ情報を含む構造化文書に対して発行可能なクエリを表す具体クエリと、前記具体クエリを抽象的に表した抽象クエリとを関連付けて記憶する第2の記憶手段とを用いて、
     処理対象の構造化文書に含まれる情報に未知のスキーマ情報が適用されている場合に、前記第1の記憶手段において、前記情報に適用されているシェイプ情報に対して継承関係を持つシェイプ情報に関連付けられたスキーマ情報を、前記未知のスキーマ情報に関連性のある関連スキーマ情報として決定する継承関係推論ステップと、
     前記第2の記憶手段において、前記処理対象の構造化文書について入力された抽象クエリと、前記関連スキーマ情報とに関連付けられた具体クエリを、前記処理対象の構造化文書に対して発行する具体クエリとして決定するクエリ決定ステップと、
     をコンピュータ装置に実行させるプログラムを記憶した記憶媒体。
PCT/JP2016/086185 2015-12-08 2016-12-06 文書処理装置、方法および記憶媒体 WO2017099059A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/780,707 US20180365273A1 (en) 2015-12-08 2016-12-06 Document processing apparatus, method and storage medium
JP2017555068A JPWO2017099059A1 (ja) 2015-12-08 2016-12-06 文書処理装置、方法および記憶媒体

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015-239089 2015-12-08
JP2015239089 2015-12-08

Publications (1)

Publication Number Publication Date
WO2017099059A1 true WO2017099059A1 (ja) 2017-06-15

Family

ID=59014168

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/086185 WO2017099059A1 (ja) 2015-12-08 2016-12-06 文書処理装置、方法および記憶媒体

Country Status (3)

Country Link
US (1) US20180365273A1 (ja)
JP (1) JPWO2017099059A1 (ja)
WO (1) WO2017099059A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002297601A (ja) * 2001-03-30 2002-10-11 Toshiba Corp 構造化文書管理方法および構造化文書管理装置およびプログラム
JP2008243075A (ja) * 2007-03-28 2008-10-09 Toshiba Corp 構造化文書管理装置及び方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1686495B1 (en) * 2005-01-31 2011-05-18 Ontoprise GmbH Mapping web services to ontologies
EP1808777B1 (en) * 2005-12-07 2014-03-12 Sap Ag System and method for matching schemas to ontologies
US20100169333A1 (en) * 2006-01-13 2010-07-01 Katsuhiro Matsuka Document processor
US8762428B2 (en) * 2011-06-06 2014-06-24 International Business Machines Corporation Rapidly deploying virtual database applications using data model analysis
US9230040B2 (en) * 2013-03-14 2016-01-05 Microsoft Technology Licensing, Llc Scalable, schemaless document query model

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002297601A (ja) * 2001-03-30 2002-10-11 Toshiba Corp 構造化文書管理方法および構造化文書管理装置およびプログラム
JP2008243075A (ja) * 2007-03-28 2008-10-09 Toshiba Corp 構造化文書管理装置及び方法

Also Published As

Publication number Publication date
US20180365273A1 (en) 2018-12-20
JPWO2017099059A1 (ja) 2018-09-27

Similar Documents

Publication Publication Date Title
US10324909B2 (en) Omega names: name generation and derivation utilizing nested three or more attributes
CN109062952B (zh) 一种数据查询方法、装置及电子设备
Sevilla Ruiz et al. Inferring versioned schemas from NoSQL databases and its applications
US9141727B2 (en) Information search device, information search method, computer program, and data structure
JP6720641B2 (ja) 多言語データティアのデータ制約
De Meester et al. Declarative data transformations for Linked Data generation: the case of DBpedia
CN112434059B (zh) 数据处理方法、装置、计算机设备和存储介质
JP4860416B2 (ja) 文書検索装置、文書検索方法および文書検索プログラム
US9483508B1 (en) Omega names: name generation and derivation
US10489024B2 (en) UI rendering based on adaptive label text infrastructure
US8707171B2 (en) Service registry policy editing user interface
JP2009145972A (ja) データべースシステム及びデータべースシステムの制御方法
US20070250482A1 (en) Method and apparatus for document matching
JP2009544102A (ja) Xml文書の、意味論を意識した処理
US8656275B2 (en) Matching various combinations of XPATH URIs to the same XML node
WO2017099059A1 (ja) 文書処理装置、方法および記憶媒体
JP2011059845A (ja) データベース操作装置、データベース操作方法、及びプログラム
US20190197108A1 (en) Method for managing semantic information on m2m/iot platform
JP2013218627A (ja) 構造化文書からの情報抽出方法、装置、及びプログラム
KR100691261B1 (ko) 확장성 생성 언어 변경 처리 시스템 및 그 방법
US9002810B1 (en) Method and system for managing versioned structured documents in a database
US8898122B1 (en) Method and system for managing versioned structured documents in a database
JP4866844B2 (ja) Lobに格納されたxml内容の効率的な抽出
KR20140104544A (ko) 의미 데이터 구축을 위한 시스템 및 방법
Tomaszuk et al. DRPD: Architecture for Intelligent Interaction with RDF Prefixes.

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16872957

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017555068

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16872957

Country of ref document: EP

Kind code of ref document: A1