using System.Threading.Tasks;
using Clarifai.API;
namespace YourNamespace
{
public class YourClassName
{
public static async Task Main()
{
var client = new ClarifaiClient("YOUR_API_KEY");
await client.SearchConcepts(
"人*",
language: "zh")
.Page(1)
.ExecuteAsync();
}
}
}
// Search for all concept names in chinese, beginning with "人".
[_app searchForConceptsByName:@"人*" andLanguage:@"zh" completion:^(NSArray<ClarifaiConcept *> *concepts, NSError *error) {
for (ClarifaiConcept *concept in concepts) {
NSLog(@"tag name: %@", concept.conceptName);
}
}];
use Clarifai\API\ClarifaiClient;
use Clarifai\DTOs\Predictions\Concept;
$client = new ClarifaiClient();
$response = $client->searchConcepts('人*')
->withLanguage('zh')
->executeSync();
if ($response->isSuccessful()) {
echo "Response is successful.\n";
$concepts = $response->get();
foreach ($concepts as $concept) {
echo $concept->name() . ' ' . $concept->value() . "\n";
}
} else {
echo "Response is not successful. Reason: \n";
echo $response->status()->description() . "\n";
echo $response->status()->errorDetails() . "\n";
echo "Status code: " . $response->status()->statusCode();
}