Skip to content

Commit 3572cb3

Browse files
committed
checking of paths in pwinit. step 2
1 parent 9dce6e3 commit 3572cb3

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ src/examples/semantic_relations/related_words_out.txt
44
src/examples/semantic_relations/related_words_in1.txt
55
src/examples/config_password.php
66
/vendor
7+
/data
78
composer.lock
89
.idea
910

src/examples/export/related_words_for_Gephi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030

3131
// Serve file as XML (prompt for download, remove if unnecessary)
32-
//header('Content-type: "text/xml"; charset="utf8"');
33-
//header('Content-disposition: attachment; filename="'.NAME_DB.'_'.date('Y-m-d').'.gexf"');
32+
header('Content-type: "text/xml"; charset="utf8"');
33+
header('Content-disposition: attachment; filename="'.NAME_DB.'_'.date('Y-m-d').'.gexf"');
3434

3535
//echo \piwidict\export\PWGEXF::getRelatedWords();
3636
echo PWGEXF::getRelatedWords();

src/init/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require '../../vendor/autoload.php';
44

5+
use cijic\phpMorphy;
6+
57
use piwidict\Piwidict;
68
use piwidict\PWInit;
79

src/piwidict/PWInit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static public function createVocabularyRelatedTables() {
145145

146146
}
147147

148-
/** Counts frequency of occurance of lemmas in meanings and writes to field `pw_lemma_LANG_CODE.frequency`,
148+
/** Counts frequency of occurrence of lemmas in meanings and writes to field `pw_lemma_LANG_CODE.frequency`,
149149
* if this lemma does not exist in table, that it added there with origin=2 and meaning_id where it has be found.
150150
*/
151151
static public function count_frequency_lemma_in_meaning() {
@@ -172,7 +172,7 @@ static public function count_frequency_lemma_in_meaning() {
172172

173173
// Create phpMorphy instance
174174
try {
175-
$morphy = new phpMorphy($dir, $lang, $opts);
175+
$morphy = new \phpMorphy($dir, $lang, $opts);
176176
} catch(phpMorphy_Exception $e) {
177177
die('Error occured while creating phpMorphy instance: ' . PHP_EOL . $e);
178178
}

0 commit comments

Comments
 (0)