Este documento discute o uso de processamento de linguagem natural (PLN) para analisar textos da história contemporânea do Brasil. Ele apresenta o projeto OpenWordnet-PT, que visa desenvolver recursos de PLN para o português brasileiro, incluindo um wordnet e ontologias. Também descreve o modelo de dados do Centro de Pesquisa e Documentação de História Contemporânea do Brasil (CPDOC) e como transformá-lo em um banco de dados em grafo para permitir consultas complexas e interoperabilidade.
The document discusses the development of OpenWN-PT, a Brazilian Portuguese Wordnet. Key points:
- OpenWN-PT is being created as part of a joint project between CPDOC and EMAp to apply formal logical tools to Portuguese text.
- It is based on the Universal Wordnet (UWN) which projects WordNet concepts into over 200 languages using statistical methods. The UWN provides an initial automated version of a Portuguese Wordnet.
- The creators are working to improve the initial UWN-based Portuguese Wordnet by combining it with data from Princeton WordNet, UWN, MENTA, and EuroWordNet to generate a new OpenWN-PT file.
The document discusses using intuitionistic description logic (iALC) to formalize legal ontologies and reasoning. It argues that an intuitionistic approach is better suited than classical logic for modeling law. iALC allows representing legal concepts, individuals, and relationships between valid legal statements. The document provides an example of using iALC to represent and reason about a contract dispute involving parties from different legal systems.
Jesus was amazed by both great faith and a lack of faith. He marveled at the faith of a centurion and a Canaanite woman, but was amazed at the unbelief of people in his hometown because it prevented him from doing miracles. The document then discusses how people of faith throughout history subdued kingdoms, stopped lions' mouths, escaped dangers, and were tortured through their faith as described in Hebrews 11. It encourages readers to have faith like these believers.
This document describes the embedding of NomLex-BR, a dictionary of Portuguese nominalizations, into OpenWordNet-PT. NomLex-BR relates nominal terms to their corresponding verbs. It contains over 2,539 entries from various sources. The integration aims to facilitate linguistic research and information extraction by connecting deverbal nouns to their verbs. Some issues in OpenWordNet-PT were also identified in the process, such as linking the noun "aviltamento" to the correct verb "aviltar". Future work includes further improvements to coverage and applications to test the resource.
For the seasoned or new to WordPress developer this session will discus the basics of setting up WordPress using WPI (Web Platform Installer). We will walk through the basic WPI setup, WordPress installation, Db configuration and general setup procedures on your localhost.
Is it important to explain a theorem? A case study in UML and ALCQIAlexandre Rademaker
The document discusses conceptual modeling from a logical point of view. It outlines the main steps of conceptual modeling as observing the world, determining relevance, choosing terminology, writing axioms, and verifying correctness. It notes that steps 1-2 can use informal notations like UML but are essentially an "art". Step 5 of verification demands significant knowledge of the model. The document also discusses using logic to explain theorems proven from an ontology, providing examples of proofs using tableaux and sequent calculus that the ontology implies a disjunction.
Building a Community with Social Media and Web 2.0 - Part IILaSandra Brill
The document describes Cisco's marketing strategy for launching its ASR 1000 router using a virtual, viral, and visual approach on social media and the web. The strategy included generating pre-launch buzz through videos, games, and communities on platforms like Facebook, YouTube, and Second Life. It also highlighted registering for an online launch event to announce the new product globally at a much lower cost than previous physical launches. The strategy was seen as highly successful with large online and global reach, and became a new model for Cisco product launches.
The document discusses the development of OpenWN-PT, a Brazilian Portuguese Wordnet. Key points:
- OpenWN-PT is being created as part of a joint project between CPDOC and EMAp to apply formal logical tools to Portuguese text.
- It is based on the Universal Wordnet (UWN) which projects WordNet concepts into over 200 languages using statistical methods. The UWN provides an initial automated version of a Portuguese Wordnet.
- The creators are working to improve the initial UWN-based Portuguese Wordnet by combining it with data from Princeton WordNet, UWN, MENTA, and EuroWordNet to generate a new OpenWN-PT file.
The document discusses using intuitionistic description logic (iALC) to formalize legal ontologies and reasoning. It argues that an intuitionistic approach is better suited than classical logic for modeling law. iALC allows representing legal concepts, individuals, and relationships between valid legal statements. The document provides an example of using iALC to represent and reason about a contract dispute involving parties from different legal systems.
Jesus was amazed by both great faith and a lack of faith. He marveled at the faith of a centurion and a Canaanite woman, but was amazed at the unbelief of people in his hometown because it prevented him from doing miracles. The document then discusses how people of faith throughout history subdued kingdoms, stopped lions' mouths, escaped dangers, and were tortured through their faith as described in Hebrews 11. It encourages readers to have faith like these believers.
This document describes the embedding of NomLex-BR, a dictionary of Portuguese nominalizations, into OpenWordNet-PT. NomLex-BR relates nominal terms to their corresponding verbs. It contains over 2,539 entries from various sources. The integration aims to facilitate linguistic research and information extraction by connecting deverbal nouns to their verbs. Some issues in OpenWordNet-PT were also identified in the process, such as linking the noun "aviltamento" to the correct verb "aviltar". Future work includes further improvements to coverage and applications to test the resource.
For the seasoned or new to WordPress developer this session will discus the basics of setting up WordPress using WPI (Web Platform Installer). We will walk through the basic WPI setup, WordPress installation, Db configuration and general setup procedures on your localhost.
Is it important to explain a theorem? A case study in UML and ALCQIAlexandre Rademaker
The document discusses conceptual modeling from a logical point of view. It outlines the main steps of conceptual modeling as observing the world, determining relevance, choosing terminology, writing axioms, and verifying correctness. It notes that steps 1-2 can use informal notations like UML but are essentially an "art". Step 5 of verification demands significant knowledge of the model. The document also discusses using logic to explain theorems proven from an ontology, providing examples of proofs using tableaux and sequent calculus that the ontology implies a disjunction.
Building a Community with Social Media and Web 2.0 - Part IILaSandra Brill
The document describes Cisco's marketing strategy for launching its ASR 1000 router using a virtual, viral, and visual approach on social media and the web. The strategy included generating pre-launch buzz through videos, games, and communities on platforms like Facebook, YouTube, and Second Life. It also highlighted registering for an online launch event to announce the new product globally at a much lower cost than previous physical launches. The strategy was seen as highly successful with large online and global reach, and became a new model for Cisco product launches.
This document discusses verifying the integrity constraints of the Portuguese WordNet (OpenWordnet-PT) against the ontology for encoding wordnets. It was the first attempt to check correctness and improve the linguistic data by correcting errors found. Various types of errors were discovered, including datatype errors, domain and range errors, and structural errors. Explanations provided by reasoning tools helped identify and fix issues, improving the overall quality and accuracy of the OpenWordnet-PT resource.
This document provides an overview of several Portuguese WordNets that have been created, including both closed and open-source versions. It describes the origins, sizes, and features of WordNets like WordNet.PT, WordNet.BR, MultiWordNet.PT, Onto.PT, OpenWordNet-PT, PULO, and UFES-WordNet. It also provides a quantitative comparison of these WordNets and identifies opportunities for future collaboration between open-source projects.
On the Computational Complexity of Intuitionistic Hybrid Modal LogicAlexandre Rademaker
This document summarizes research on the computational complexity of intuitionistic hybrid modal logic (IHK). It finds that IHK is PSPACE-complete by describing an alternating Turing machine that can determine the winner of a satisfiability game for IHK formulas in polynomial space. The game involves two players selecting sets of subformulas and formulas from a set to extend an intuitionistic Kripke model in a way that satisfies the formulas. The document also describes the language and semantics of IHK and provides examples of using intuitionistic ALC to represent a legal case study involving conflict of laws.
OpenWordnet-PT is a freely available Portuguese WordNet created using automated methods. It leverages existing multilingual resources like EuroWordNet, MultiWordNet, and the Unified WordNet to project word senses from English to Portuguese. Over 50,000 words and 74,000 senses have been mapped so far through a combination of automated techniques and manual validation. The resource is being used in applications such as word sense disambiguation, sentiment analysis, and linking textual archives to knowledge bases. Future work includes improving coverage, developing a web interface, and linking to other lexical resources like Nomlex-BR.
A linked open data architecture for contemporary historical archivesAlexandre Rademaker
The document describes the current architecture of the Center of Brazilian Contemporary History (CPDOC) archives. It details the different types of archival collections held by CPDOC, including personal archives, oral histories, and biographical dictionaries. It also summarizes the current relational database structure used to manage metadata for the archives, which includes 89 tables and 660 fields.
The document discusses description logics, which are decidable fragments of first-order logic used for knowledge representation. It presents the syntax and semantics of ALC, a basic description logic. It then introduces a labeled sequent calculus called SCALC for reasoning with ALC concepts. SCALC uses labeled formulas and includes structural, boolean, and generalization rules for reasoning over ALC concepts. An example proof in SCALC is provided.
A database approach to monitoring the quality of information in RDF storesAlexandre Rademaker
This document proposes using a database approach to monitor the quality of information stored in RDF databases. It discusses representing semantic properties of databases using integrity constraints and maintaining correctness through integrity enforcement and truth maintenance. It also discusses modeling constraints like marriage being between one man and one woman in a relational database using techniques beyond basic checks like primary and foreign keys.
O documento discute os conceitos fundamentais da lógica de primeira ordem, incluindo sua linguagem, termos, fórmulas, variáveis, estruturas e semântica. É definido que uma linguagem de primeira ordem consiste em símbolos lógicos, variáveis, símbolos de igualdade, quantificadores, símbolos predicativos e de funções/constantes. Fórmulas são construídas a partir de termos usando quantificadores e conectivos lógicos. Estruturas fornecem interpretações dos quantificadores e símbolos na lingu
This document discusses verifying the integrity constraints of the Portuguese WordNet (OpenWordnet-PT) against the ontology for encoding wordnets. It was the first attempt to check correctness and improve the linguistic data by correcting errors found. Various types of errors were discovered, including datatype errors, domain and range errors, and structural errors. Explanations provided by reasoning tools helped identify and fix issues, improving the overall quality and accuracy of the OpenWordnet-PT resource.
This document provides an overview of several Portuguese WordNets that have been created, including both closed and open-source versions. It describes the origins, sizes, and features of WordNets like WordNet.PT, WordNet.BR, MultiWordNet.PT, Onto.PT, OpenWordNet-PT, PULO, and UFES-WordNet. It also provides a quantitative comparison of these WordNets and identifies opportunities for future collaboration between open-source projects.
On the Computational Complexity of Intuitionistic Hybrid Modal LogicAlexandre Rademaker
This document summarizes research on the computational complexity of intuitionistic hybrid modal logic (IHK). It finds that IHK is PSPACE-complete by describing an alternating Turing machine that can determine the winner of a satisfiability game for IHK formulas in polynomial space. The game involves two players selecting sets of subformulas and formulas from a set to extend an intuitionistic Kripke model in a way that satisfies the formulas. The document also describes the language and semantics of IHK and provides examples of using intuitionistic ALC to represent a legal case study involving conflict of laws.
OpenWordnet-PT is a freely available Portuguese WordNet created using automated methods. It leverages existing multilingual resources like EuroWordNet, MultiWordNet, and the Unified WordNet to project word senses from English to Portuguese. Over 50,000 words and 74,000 senses have been mapped so far through a combination of automated techniques and manual validation. The resource is being used in applications such as word sense disambiguation, sentiment analysis, and linking textual archives to knowledge bases. Future work includes improving coverage, developing a web interface, and linking to other lexical resources like Nomlex-BR.
A linked open data architecture for contemporary historical archivesAlexandre Rademaker
The document describes the current architecture of the Center of Brazilian Contemporary History (CPDOC) archives. It details the different types of archival collections held by CPDOC, including personal archives, oral histories, and biographical dictionaries. It also summarizes the current relational database structure used to manage metadata for the archives, which includes 89 tables and 660 fields.
The document discusses description logics, which are decidable fragments of first-order logic used for knowledge representation. It presents the syntax and semantics of ALC, a basic description logic. It then introduces a labeled sequent calculus called SCALC for reasoning with ALC concepts. SCALC uses labeled formulas and includes structural, boolean, and generalization rules for reasoning over ALC concepts. An example proof in SCALC is provided.
A database approach to monitoring the quality of information in RDF storesAlexandre Rademaker
This document proposes using a database approach to monitor the quality of information stored in RDF databases. It discusses representing semantic properties of databases using integrity constraints and maintaining correctness through integrity enforcement and truth maintenance. It also discusses modeling constraints like marriage being between one man and one woman in a relational database using techniques beyond basic checks like primary and foreign keys.
O documento discute os conceitos fundamentais da lógica de primeira ordem, incluindo sua linguagem, termos, fórmulas, variáveis, estruturas e semântica. É definido que uma linguagem de primeira ordem consiste em símbolos lógicos, variáveis, símbolos de igualdade, quantificadores, símbolos predicativos e de funções/constantes. Fórmulas são construídas a partir de termos usando quantificadores e conectivos lógicos. Estruturas fornecem interpretações dos quantificadores e símbolos na lingu
Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o projeto OpenWordnet-PT
1. Processamento de Linguagem Natural em textos
da História Comptemporânea do Brasil: o projeto
OpenWordnet-PT
Alexandre Rademaker
EMAp, FGV
October 3, 2012
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 1 / 32
2. Colaboradores
Valeria de Paiva
Gerard de Melo, Berkeley
Adam Pease, http://www.articulatesoftware.com
Rafael Haeusler
E outros.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 2 / 32
3. Conteúdo
1 PLN para um Lógico
2 PLN introdução
3 O modelo de dados do CPDOC
4 NLP para o português
A OpenWordnet-PT
Ontologia SUMO
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 3 / 32
4. PLN para um Lógico
Processamento de linguagem natural para um Lógico
Thanks Valeria de Paiva.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 4 / 32
5. PLN para um Lógico
Experiência prévia: projeto ANUBIS
Configure every system to encrypt connections used for
remote access to the system.
Representação lógica (logical forms):
Action01 ≡
∃hasVerb.(Configure
∃hasTheme.System
∃hasPurpose.(Encrypt
∃hasTheme.(NetworkConnect
∃isInstrumentOf .(AccessRemotely
∃hasTheme.System))))
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 5 / 32
6. PLN para um Lógico
Experiência prévia: projeto ANUBIS
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 5 / 32
7. PLN para um Lógico
Experiência prévia: projeto ANUBIS
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 5 / 32
8. PLN para um Lógico
Usando a lógica iALC para formalização de leis
Um exemplo
Peter and Maria signed a renting contract. The subject of the contract is an
apartment in Rio de Janeiro. The contract states that any dispute will go to court in
Rio de Janeiro. Peter is 17 and Maria is 20. Peter lives in Edinburgh and Maria lives
in Rio.
Only legally capable individuals have civil obligations:
PeterLiable ContractHolds@RioCourt, shortly, pl cmp
MariaLiable ContractHolds@RioCourt, shortly, ml cmp
Concepts, nominals and their relationships
BR is the collection of Brazilian Valid Legal Statements
SC is the collection of Scottish Valid Legal Statements
PILBR is the collection of Private International Laws in Brazil
ABROAD is the collection of VLS outside Brazil
LexDomicilium is a legal connection:
Legal Connections The pair pl, pl is in LexDomicilium
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 6 / 32
9. PLN para um Lógico
Axiomas não lógicos
O conjunto ∆, de conceitos, e Ω, de iALC axiomas representam o
conhecimento extraido do caso.
ml : BR pl : SC pl cmp
∆=
ml cmp pl LexDom pl
PILBR ⇒ BR
Ω= SC ⇒ ABROAD
∃LexD1 .L1 . . . ∃LexDom.ABROAD . . . ∃LexDk .Lk ⇒ PILBR
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 7 / 32
10. PLN para um Lógico
Um sistema dedutivo para iALC
∆⇒ x :A A⇒ B
Usual Structural-Rules for Intuitionistic Logic ∈-r
∆⇒ x :B
Γ, x : C ⇒ x : C, ∆ xRy , Γ ⇒ ∆, xRy
Γ1 ⇒ C Γ2 , D ⇒ ∆ Γ, C ⇒ D
-l -r
Γ1 , Γ2 , C D⇒ ∆ Γ⇒ C D
Γ, x : C, x : D ⇒ ∆ Γ ⇒ x : C,∆ Γ ⇒ x : D,∆
-l -r
Γ, x : (C D) ⇒ ∆ Γ ⇒ x : (C D),∆
Γ, x : C ⇒ ∆ Γ, x : D ⇒ ∆ Γ ⇒ x : C, x : D, ∆
-l
Γ, x : (C D), ⇒ ∆ Γ ⇒ x : (C D), ∆
Γ, x : ∀R.C, y : C, xRy ⇒ ∆ Γ, xRy ⇒ y : C, ∆
∀-l ∀-r
Γ, x : ∀R.C, xRy ⇒ ∆ Γ ⇒ x : ∀R.C, ∆
Γ, xRy , y : C ⇒ ∆ Γ ⇒ ∆, xRy Γ ⇒ ∆, y : C
∃-l ∃-r
Γ, x : ∃R.C ⇒ ∆ Γ ⇒ ∆, x : ∃R.C
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 8 / 32
11. PLN para um Lógico
Usando o sistema dedutivo
Ω
∆ ⇒ pl : SC pl : SC ⇒ pl : A ∃LexD.A ⇒ ∃LexD.A Ω
cut -R
∆ ⇒ pl : A ∆ ⇒ pl LexD pl ∃LexD.A ⇒ PILBR PILBR ⇒ BR
∃−R cut
∆ ⇒ pl : ∃LexD.A ∃LexD.A ⇒ BR
inc − R
∆ ⇒ pl : BR
Ω
Π
∆ ⇒ pl : BR ml : BR, pl : BR ⇒ cmp : BR
cut
∆ ⇒ ml : BR ∆, ml : BR ⇒ cmp : BR
cut
∆ ⇒ cmp : BR
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História Comptemporânea do Brasil: o
October 3, 2012 9 / 32
12. PLN introdução
O que é PLN? 1
Resposta à perguntas (IBM Watson ganhou o Jeopardy 2011)
Extração de Informações (eventos e telefones de emails)
Expanção de queries (via sinômimos)
Análise de sentimentos (críticas em blogs e em sites online)
Tradução
Classificação ou agrupamento de textos
Sumarização
Linguagens controladas . . .
Ambiguidade é difícil!
Em inglês: “Red Tape Holds Up New Bridges”.
Em português: “João viu a bela mulher na rua com o binóculo.”.
1
File intro-nlp.pdf em https://class.coursera.org/nlp/.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do10 / 32 o
Comptemporânea Brasil:
13. PLN introdução
NLP é difícil
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do11 / 32 o
Comptemporânea Brasil:
14. PLN introdução
NLP é difícil
O que precisamos?
Precisamos de informações sobre o mundo.
Precisamos de informações sobre o idioma.
Combinar conhecimento sobre idioma e mundo!
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do11 / 32 o
Comptemporânea Brasil:
15. PLN introdução
O projeto: PLN dos textos da histórica
comtemporânea do Brasil
No longo prazo, ferramentas lógicas para extração de
conhecimento dos textos.
Melhorar a estrutura das informações e capacidade de responder
perguntas do sistema. Inferência de relações e propriedades
implícitas sobre conceitos e termos.
No contexto do MIST, foco no DHBB.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do12 / 32 o
Comptemporânea Brasil:
16. PLN introdução
Preparando o terreno para usar os dados...
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do13 / 32 o
Comptemporânea Brasil:
17. O modelo de dados do CPDOC
CPDOC: modelo ER de dados
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do14 / 32 o
Comptemporânea Brasil:
18. O modelo de dados do CPDOC
CPDOC: modelo ER de dados
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do14 / 32 o
Comptemporânea Brasil:
19. O modelo de dados do CPDOC
BD relacionais
- Rigidez para mudanças frequentes (diárias, semanais).
Definições à priori.
- Tabelas adicionais para “guardar” relações muitos-muitos.
- Performance depende de decisões e manutenção de um
DBA.
- Poucas restrições sobre o domínio no modelo.
+ Ferramentas disponíveis para desenvolvimento de
sistemas de Informação. Padrões.
+ Disponibilidade de mão-de-obra.
“Selecting the next database for your project”, http://www.franz.com.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do15 / 32 o
Comptemporânea Brasil:
20. O modelo de dados do CPDOC
graph BD (triplestores)
Triplas
createTripleStore(seminar.db)
addTriple (Person1 first-name Steve)
addTriple (Person1 isa Organizer)
addTriple (Person1 age 52)
addTriple (Person2 first-name Jans)
addTriple (Person2 isa Psychologist)
addTriple (Person2 age 50)
addTriple (Person3 first-name Craig)
addTriple (Person3 isa SalesPerson)
addTriple (Person3 age 32)
addTriple (Person1 colleague-of Person2)
addTriple (Person1 colleague-of Person3)
addTriple (Person1 likes Pizza)
“Selecting the next database for your project”, http://www.franz.com.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do16 / 32 o
Comptemporânea Brasil:
21. O modelo de dados do CPDOC
graph BD (triplestores)
Grafo
“Selecting the next database for FGV) project”, http://www.franz.com.
Alexandre Rademaker (EMAp, your Processamento de Linguagem Natural em textos da História October 3, 2012 do16 / 32 o
Comptemporânea Brasil:
22. O modelo de dados do CPDOC
graph BD (triplestores)
Novos “fatos”
addTriple ( Person3 neighbour-of Person1)
addTriple ( Person3 neighbour-of Person2)
“Selecting the next database for your project”, http://www.franz.com.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do16 / 32 o
Comptemporânea Brasil:
23. O modelo de dados do CPDOC
graph BD (triplestores)
Novo modelo
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do16 / 32 o
Comptemporânea Brasil:
24. O modelo de dados do CPDOC
Graph databases
Vantagens
Modelagem de diferentes tipos com diferentes propriedades.
Expansível.
Requisitos do domínio implementados por regras ou axiomas, no
modelo.
Queries complexas
Protocolos e Padrões: SPARQL, OWL, RDF, RDFS etc.
Fácil interoperabilidade.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do17 / 32 o
Comptemporânea Brasil:
25. O modelo de dados do CPDOC
Graph databases
Consultas
“Selecting the next database for your project”, http://www.franz.com.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do17 / 32 o
Comptemporânea Brasil:
26. O modelo de dados do CPDOC
Graph databases
ER → Graph
Fácil! Ferramenta http://d2rq.org/d2r-server!
Mas... Ajustes no modelo são necessários!
Vide exemplo
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do17 / 32 o
Comptemporânea Brasil:
27. O modelo de dados do CPDOC
DBHH como um grafo
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do18 / 32 o
Comptemporânea Brasil:
28. O modelo de dados do CPDOC
DBHH como um grafo
Vantagens do modelo Grafo
Fácil integração de vocabulários e modelos.
Fácil armazenamento de resultados (novas propriedades)
Interoperabilidade entre sistemas.
LSA: primeiro exercício
LSA tutorial.
Limitações do LFA. Wikipedia
Precisava do DHBB em arquivos...
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do18 / 32 o
Comptemporânea Brasil:
29. O modelo de dados do CPDOC
DBHH como um grafo
Protótipo
Mostrar protótipo
Mostrar arquivos
Idéias: (1) 1 verbete → 1 arquivo (URL e RDF); (2) Solr; (3)
Geração de site Estático; (4) DVC (git system).
Desvantagem: feedbacks não são incorporados ao DHBB.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do18 / 32 o
Comptemporânea Brasil:
30. O modelo de dados do CPDOC
Voltando ao problema principal...
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do19 / 32 o
Comptemporânea Brasil:
31. NLP para o português
NLP: o que precisamos?
Passos básicos não tão triviais:
Importação de documentos (HTML, PDF etc)
Tokenização (ex: “Dr. Fulano da F.G.V.”)
Remoção de palavras não desejadas (stop words)
Stemming (ex: educado, educada, educados etc. → educad)
Lemmatization (ex: educar. A entrada do dicionário.)
Thanks Gerard de Melo.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do20 / 32 o
Comptemporânea Brasil:
32. NLP para o português
NLP: o que precisamos também...
Queremos aproveitar ferramentas para o inglês. Mas precisamos de
informações sobre o (em) português.
Wordnet-like dicionário.
Named entity reconizer.
SUMO para o Português.
NOMLEX-BR
Verbnet-like KB.
FrameNet-like KB.
Gramática para o português (LFGs for XLE?)
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do21 / 32 o
Comptemporânea Brasil:
33. NLP para o português
Agenda de pesquisa inicial
Construir uma Wordnet em português.
Conectar a Wordnet-PT à SUMO Ontology para: (1) usar a
SUMO; (2) conexão da Wordnet-PT com outras Wordnets.
Investigar o uso da Wordnet-PT para resolução de ambiguidades:
(1) expansão de consultas; (2) subjunção de textos.
No DHBB: (1) extração de entidades nomeadas; e (2) extração de
relações entre entidades (parentesco, amizade etc.)
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do22 / 32 o
Comptemporânea Brasil:
34. NLP para o português A OpenWordnet-PT
Wordnet: o que e para que?
O que?
Uma espécie de dicionário.
Palavras são agrupadas em synsets (conjuntos = conceitos).
Sinôminos em um dado contexto.
Synsets são relacionados (rel. semânticas) e palavras são
relacionadas (rel. sintáticas).
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do23 / 32 o
Comptemporânea Brasil:
35. NLP para o português A OpenWordnet-PT
Wordnet: o que e para que?
Synset
WORDS mouth, speak, talk, utter, verbalise, verbalize
GLOSS express in speech
EXAMPLE "She talks a lot of nonsense";
EXAMPLE "This depressed patient does not verbalize"
Princeton WordNet online
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do23 / 32 o
Comptemporânea Brasil:
36. NLP para o português A OpenWordnet-PT
Wordnet: o que e para que?
Para que?
Word Sense Disambiguation (expresso pode ser: (1) explícito; (2)
rápido; ou (3) verbo expressar).
Expansão de consultas
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do23 / 32 o
Comptemporânea Brasil:
37. NLP para o português A OpenWordnet-PT
A OpenWordnet-PT
Disponível para download
Open Multilingual Wordnet. Vide estatísticas. Exemplo de
consulta.
7422 adjetivos, 55951 nomes, 1726 advérbios e 7155 verbos.
Cobertura? Comparando com o DHBB? (1) Lemmatization; (2)
Remoção de stop words.
Correção? Verificação manual vide templates de frases.
Vide arquivos. Exemplos do DHBB:
transmite, transmitiam, transmitira, transmitirem → transmitir.
tolerado, tolerando, toleraria, tolerariam, toleráveis → tolerar.
Estado (2979 vezes) → estar?
Ingressou (182), reingressou (7)e ingressou (745) → ingressar
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do24 / 32 o
Comptemporânea Brasil:
38. NLP para o português A OpenWordnet-PT
A OpenWordnet-PT
Disponível para download
Open Multilingual Wordnet. Vide estatísticas. Exemplo de
consulta.
7422 adjetivos, 55951 nomes, 1726 advérbios e 7155 verbos.
Cobertura? Comparando com o DHBB? (1) Lemmatization; (2)
Remoção de stop words.
Correção? Verificação manual vide templates de frases.
Vide arquivos. Exemplos do DHBB:
transmite, transmitiam, transmitira, transmitirem → transmitir.
tolerado, tolerando, toleraria, tolerariam, toleráveis → tolerar.
Estado (2979 vezes) → estar?
Ingressou (182), reingressou (7)e ingressou (745) → ingressar
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do24 / 32 o
Comptemporânea Brasil:
39. NLP para o português A OpenWordnet-PT
A OpenWordnet-PT
Disponível para download
Open Multilingual Wordnet. Vide estatísticas. Exemplo de
consulta.
7422 adjetivos, 55951 nomes, 1726 advérbios e 7155 verbos.
Cobertura? Comparando com o DHBB? (1) Lemmatization; (2)
Remoção de stop words.
Correção? Verificação manual vide templates de frases.
Vide arquivos. Exemplos do DHBB:
transmite, transmitiam, transmitira, transmitirem → transmitir.
tolerado, tolerando, toleraria, tolerariam, toleráveis → tolerar.
Estado (2979 vezes) → estar?
Ingressou (182), reingressou (7)e ingressou (745) → ingressar
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do24 / 32 o
Comptemporânea Brasil:
40. NLP para o português A OpenWordnet-PT
A OpenWordnet-PT
Disponível para download
Open Multilingual Wordnet. Vide estatísticas. Exemplo de
consulta.
7422 adjetivos, 55951 nomes, 1726 advérbios e 7155 verbos.
Cobertura? Comparando com o DHBB? (1) Lemmatization; (2)
Remoção de stop words.
Correção? Verificação manual vide templates de frases.
Vide arquivos. Exemplos do DHBB:
transmite, transmitiam, transmitira, transmitirem → transmitir.
tolerado, tolerando, toleraria, tolerariam, toleráveis → tolerar.
Estado (2979 vezes) → estar?
Ingressou (182), reingressou (7)e ingressou (745) → ingressar
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do24 / 32 o
Comptemporânea Brasil:
41. NLP para o português A OpenWordnet-PT
A OpenWordnet-PT
Disponível para download
Open Multilingual Wordnet. Vide estatísticas. Exemplo de
consulta.
7422 adjetivos, 55951 nomes, 1726 advérbios e 7155 verbos.
Cobertura? Comparando com o DHBB? (1) Lemmatization; (2)
Remoção de stop words.
Correção? Verificação manual vide templates de frases.
Vide arquivos. Exemplos do DHBB:
transmite, transmitiam, transmitira, transmitirem → transmitir.
tolerado, tolerando, toleraria, tolerariam, toleráveis → tolerar.
Estado (2979 vezes) → estar?
Ingressou (182), reingressou (7)e ingressou (745) → ingressar
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do24 / 32 o
Comptemporânea Brasil:
42. NLP para o português A OpenWordnet-PT
Correção da OpenWordnet-PT
Idéias
Via template de sentenças? (EuroWordNet project).
Se A e B são sinônimos, simetria é requerida. Teste 1: “A é B | B
é A”. Teste 2: “A é um tipo de B | B é um tipo de A”.
Se A é hipônimo de B. Teste: “A é um tipo de B” e “B não é um
tipo de A”.
Outros testes.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do25 / 32 o
Comptemporânea Brasil:
43. NLP para o português A OpenWordnet-PT
Correção da OpenWordnet-PT
Exemplos
“Uma bica é uma bebida.” (Verdade)
“Uma bebida é uma bica.” (Falso)
“Uma bica é um expresso.” (Verdade)
Portuguese Wordnet: General archicteture and Internal Semantic Relations by Palmira Marrafa.
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do25 / 32 o
Comptemporânea Brasil:
44. NLP para o português Ontologia SUMO
SUMO Ontology
SUMO é uma ontologia de topo (conjunto de definições em uma
Ling formal).
Uma tentativa de capturar os mais gerais e reusáveis termos e
definições.
Termos da SUMO foram mapeadas para a synsets da WordNet.
Algumas palavras são “vagas” para uma definição formal.
Sigma Interface
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do26 / 32 o
Comptemporânea Brasil:
45. NLP para o português Ontologia SUMO
SUMO Ontology
SUMO é uma ontologia de topo (conjunto de definições em uma
Ling formal).
Uma tentativa de capturar os mais gerais e reusáveis termos e
definições.
Termos da SUMO foram mapeadas para a synsets da WordNet.
Algumas palavras são “vagas” para uma definição formal.
Sigma Interface
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do26 / 32 o
Comptemporânea Brasil:
46. NLP para o português Ontologia SUMO
SUMO Ontology
SUMO é uma ontologia de topo (conjunto de definições em uma
Ling formal).
Uma tentativa de capturar os mais gerais e reusáveis termos e
definições.
Termos da SUMO foram mapeadas para a synsets da WordNet.
Algumas palavras são “vagas” para uma definição formal.
Sigma Interface
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do26 / 32 o
Comptemporânea Brasil:
47. NLP para o português Ontologia SUMO
SUMO Ontology
SUMO é uma ontologia de topo (conjunto de definições em uma
Ling formal).
Uma tentativa de capturar os mais gerais e reusáveis termos e
definições.
Termos da SUMO foram mapeadas para a synsets da WordNet.
Algumas palavras são “vagas” para uma definição formal.
Sigma Interface
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do26 / 32 o
Comptemporânea Brasil:
48. NLP para o português Ontologia SUMO
SUMO Ontology
SUMO é uma ontologia de topo (conjunto de definições em uma
Ling formal).
Uma tentativa de capturar os mais gerais e reusáveis termos e
definições.
Termos da SUMO foram mapeadas para a synsets da WordNet.
Algumas palavras são “vagas” para uma definição formal.
Sigma Interface
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do26 / 32 o
Comptemporânea Brasil:
49. NLP para o português Ontologia SUMO
SUMO vs. WordNet
“bright” como “full of promise”.
“John has a bright future. He was selected for the varsity
basketball team as a freshman.”
Em outro contexto, “John is bright”... Ele provavelmente será
eleito presidente...
A palavra “walk”? Mais fácil ter definição formal e ser organizada
em uma hierarquia de movimentos.
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do27 / 32 o
Comptemporânea Brasil:
50. NLP para o português Ontologia SUMO
SUMO vs. WordNet
SUMO é uma ontologia: (1) regras; (2) formal; (3) para ser usado
por um provador de teoremas. Feita para ser consistente.
Wordnet é uma base de dados léxica.
Léxicos são coletados e não podem ser livremente criados.
Palavras podem ser vagas e ambíguas (Para que?).
“transient role” vs. tipo.
Wordnet é usada para modelar uma linguagem
SUMO é usada para modelar a realidade.
A conexão de ambos os recursos permite melhor entender a
linguagem.
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do28 / 32 o
Comptemporânea Brasil:
51. NLP para o português Ontologia SUMO
SUMO vs. Wordnet
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do29 / 32 o
Comptemporânea Brasil:
52. NLP para o português Ontologia SUMO
SUMO e Português
Extender SUMO com definições da cultura brasileira.
Mapeamento da SUMO para a OpenWordNet-PT: conceitos não
lexicalizáveis em inglês.
Exemplo: churrascaria?!
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do30 / 32 o
Comptemporânea Brasil:
53. NLP para o português Ontologia SUMO
Definição formal de Churrascaria?
(subclass MeatRestaurant Restaurant)
(=>
(and
(instance ?X MeatRestaurant)
(instance ?F Meal)
(located ?F ?X))
(and
(equals ?P1
(ProbabilityFn
(exists (?FM)
(and (instance ?FM Meat)
(contains ?F ?FM))))
(equals ?P2
(ProbabilityFn
(not
(exists (?FM)
(and (instance ?FM Meat)
(contains ?F ?FM))))
(greaterThan ?P1 ?P2)))
Thanks Adam Pease
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do31 / 32 o
Comptemporânea Brasil:
54. NLP para o português Ontologia SUMO
Obrigado!
S: (v) thank, give thanks (express gratitude or show appreciation to)
(=>
(and
(instance ?THANK Thanking)
(agent ?THANK ?AGENT)
(patient ?THANK ?THING)
(destination ?THANK ?PERSON))
(and
(instance ?PERSON Human)
(or
(holdsDuring
(WhenFn ?THANK)
(wants ?AGENT ?THING))
(holdsDuring
(WhenFn ?THANK)
(desires ?AGENT ?THING)))))
Alexandre Rademaker (EMAp, FGV) Processamento de Linguagem Natural em textos da História October 3, 2012 do32 / 32 o
Comptemporânea Brasil: