Skip to content

Commit b4d14cc

Browse files
committed
Merge pull request #33 from fhasanaj/RCB-377_add_genre
Added genre parameter and updated entities_linked example
2 parents 1b7ad31 + af847e0 commit b4d14cc

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

examples/entities_linked.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
$params = new DocumentParameters();
1919
$content = $entities_linked_text_data;
2020
$params->set('content', $content);
21+
$params->set('genre', 'social-media');
2122

2223
try {
2324
$result = $api->entities($params, true);

source/rosette/api/DocumentParameters.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class DocumentParameters extends RosetteParamsSetBase
4848
*/
4949
public $fileName;
5050

51+
/**
52+
* @var string genre to categorize the input data
53+
*/
54+
public $genre;
55+
5156
/**
5257
* Constructor.
5358
*
@@ -59,6 +64,7 @@ public function __construct()
5964
$this->contentUri = '';
6065
$this->language = '';
6166
$this->multiPartContent = '';
67+
$this->genre = '';
6268
}
6369

6470
/**

source/rosette/api/NameSimilarityParameters.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class NameSimilarityParameters extends RosetteParamsSetBase
3030
* @var Name targetName target name
3131
*/
3232
public $name2;
33+
/**
34+
* @var string genre to categorize the input data
35+
*/
36+
public $genre;
3337
/**
3438
* constructor.
3539
*
@@ -40,6 +44,7 @@ public function __construct(Name $sourceName, Name $targetName)
4044
{
4145
$this->name1 = $sourceName;
4246
$this->name2 = $targetName;
47+
$this->genre = '';
4348
}
4449

4550
/**

source/rosette/api/NameTranslationParameters.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class NameTranslationParameters extends RosetteParamsSetBase
5454
* @var string targetScheme transliteration scheme for the translation (optional)
5555
*/
5656
public $targetScheme;
57+
/**
58+
* @var string genre to categorize the input data
59+
*/
60+
public $genre;
5761
/**
5862
* constructor.
5963
*/

0 commit comments

Comments
 (0)