PROJECT:MATRIX
BOOLEAN
1
Presented by : NKOU ANGOUE THERESE INDRA
PLAN
1 INTRODUCTION
2 Generic IR PIPELINE
3 BINARY _TERM DOCUMENT INCIDENCE
MATRIX
4 CODE PYTHON
5 CONCLUSION
2
INTRODUCTION
DANS LES SYSTÈMES DE GESTION D’INFORMATION, IL EST ESSENTIEL
D'ORGANISER LES DOCUMENTS AFIN DE FACILITER LA RECHERCHE DE
TERMES SPÉCIFIQUES. UNE MÉTHODE EFFICACE POUR CELA EST
L'UTILISATION DE LA MATRICE BOOLÉENNE.
3
Generic IR
Document 1
Pipeline
Document 4
"The
computer is "Data is
fast." valuable."
Document 2 Document 5
"The
internet
"The internet
stores data
uses the
in the
cloud."
cloud."
Document 3
Document 6
« The
"The
computer
computer
connects to
the cloud."
processes 4
data."
Binary Term-Document Incidence
Matrix
Documents
DOC1 DOC2 DOC3 DOC4 DOC5 DOC6
Term computer 1 0 1 0 0 1
s internet 0 1 0 0 1 0
cloud 0 1 1 0 1 0
data 0 0 0 1 1 1
Chaque ligne représente un mot distinct du corpus.
Chaque colonne correspond à un document spécifique.
La valeur 1 indique que le mot est présent dans le document
tandis que 0 signifie qu’il est absent.
5
REQUÊTES BOOLÉENNES
1. AND
SEARCH FOR DOCUMENTS THAT CONTAIN BOTH "COMPUTER" AND "DATA."
DOC1 DOC2 DOC3 DOC4 DOC5 DOC6
Terms
COMPUTER 1 0 1 0 0 1
DATA 0 0 0 1 1 1
Document 6 contains "Computer" and "Data."
This means that these two words are
present in the content of the document. 6
[Link]
Search for documents that contain "Internet" or "Cloud" (or both).
DOC1 DOC2 DOC3 DOC4 DOC5 DOC6
Term
s
Internet 0 1 0 0 1 0
cloud 0 1 1 0 1 0
The documents Doc 2, Doc 3, and Doc 5 contain "Internet" or
"Cloud."
7
This means that these words appear in these documents.
3. NOT (« Computer NOT Data")
Search for documents that contain "Computer" but not "Data."
DOC1 DOC2 DOC3 DOC4 DOC5 DOC6
Terms
Computer 1 0 1 0 0 1
Data 0 0 0 1 1 1
The documents Doc 1 and Doc 3 contain "Computer" but not
"Data."
This means that "Computer" is present in these two 8
documents, while "Data" is absent from their content.
Example of Python code.
# CRÉATION DE LA MATRICE
# MOTS : ( "COMPUTER", "INTERNET", CLOUD", "DATA"),
MATRIX = [
[1, 0, 0, 0], # DOC 1
[0, 1, 1, 0], # DOC 2
[1, 0, 1, 0], # DOC 3
[0, 0, 0, 1], # DOC 4
[0, 1, 1, 1], # DOC 5
[1, 0, 0, 1], # DOC 6
]
WORD_INDEX = 0 # INDEX POUR "COMPUTER"
RESULT = [DOC[0] FOR DOC IN MATRIX] # RECHERCHE "COMPUTER"
PRINT(RESULT)
9
CONCLUSION
En somme, la matrice booléenne s'avère être un outil puissant pour
organiser et analyser des données textuelles dans les systèmes de
gestion d'information. Elle simplifie la recherche de termes spécifiques
dans les documents et permet une gestion plus structurée de
l'information. Ce modèle de base peut être étendu et amélioré pour des
applications plus complexes, telles que les moteurs de recherche ou
l’analyse de texte à grande échelle.
10