-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayPattern.php
More file actions
31 lines (29 loc) · 951 Bytes
/
playPattern.php
File metadata and controls
31 lines (29 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
set_time_limit(20000);
error_reporting(E_ALL);
foreach (glob("functions/*.php") as $function) {
require_once ("functions/" . basename($function));
}
$globs = explode("\n", trim(file_get_contents("corpus.txt")));
$files = array();
foreach ($globs as $glob) {
$files = array_merge(glob($glob) , $files);
};
$mode = array(
false,
false
);
foreach ($files as $file) {
$dom = new DOMDocument();
$dom->load($file);
$lp = $dom->getElementsByTagName("listPerson");
$i = $lp->length;
$files2 = array($file);
$corpus = array();
$corpus[basename($file, ".xml") ] = biblio(basename($file, ".xml"));
$haystack = getHaystack($files2, $i, $mode[0], $mode[1], $corpus, true);
file_put_contents("plays/" . basename($file, ".xml") . ".txt", $haystack[basename($file, ".xml")."_I01"]["id"]["string-id"]);
}
//modifier getHaystack pour avoir le motif avec la liste des identifiants
//aller au delà de l'acte
?>