vania-janet/multiturn-rag-retrieval-data huggingface dataset:
fmt.Println(string(b))

const resourceModel = {
resource_id: serviceidCrn,
};

const params = {
resources: [resourceModel],
tagNames: ["tag_test_1", "tag_test_2"],
tagType: 'user',
};

globalTaggingService.attachTag(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
});



When you tag a service ID, all policies that have resources that are scoped to your access management tag include access to this service ID.





 Detaching tags on a service ID in the console 

To detach a tag from a service ID, complete the following steps:



1. Go to Manage > Access (IAM) > Service IDs.
2. Click the Edit icon ![Edit icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/edit-tagging.svg) in the Tags column.
3. Click the Remove icon ![Remove icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/delete.svg) on the tag that you want to detach from the service ID..
4. Click Save.



When you detach an access management tag from a service ID, any policies that are scoped that that tag no longer includes access the service ID.





 Detaching tags on a service ID by using the CLI 

To detach a tag on your service ID, use the tag-detach command.
Term & Termination Elements referring to duration of the contract, the schedule and terms of contract termination, and any consequences of termination, including any obligations that apply at or after termination. 
 Warranties Elements that refer to ongoing promises and obligations that are made in the contract that are currently true and will continue to be true in the future. Also, elements discussing the consequences of such promises or obligations being broken, and the rights to remedy the situation (for example, but not limited to, seeking damages). This category does not apply to elements that are purely concerned with representation statements (statements of fact about the past or the present), or to elements that lay out assumptions regarding things that occurred in the past. 



The categories and descriptions in the preceding table are based on United States law and might not apply in jurisdictions outside the United States.





 Attributes 

The Element Classification enrichment is deprecated and will no longer be available, effective 10 July 2020.

The attributes array specifies any attributes that are identified in the sentence. Each object in the array includes three keys: type (the type of attribute from the following table), text (the applicable text), and location (the begin and end indexes of the attribute in the input document). Currently supported attributes include:



 attributes Description 

 Currency Monetary value and units. 
 DateTime A date, time, date range, or time range. 
 DefinedTerm A term that is defined in the input document. 
 Duration A time duration. 
 Location A geographical location or region. 
 Number A digital or textual number that describes a quantity of countable things and is not classified as one of the other numerical attribute types. 
 Organization An organization. 
 Percentage A percentage. 
 Person A person. 







 Effective dates 

The Element Classification enrichment is deprecated and will no longer be available, effective 10 July 2020.

The effective_dates array identifies the date or dates on which the document becomes effective.



 effective_dates Description 

 confidence_level The confidence level of the identification of the effective date. Possible values include High, Medium, and Low. 
 text An effective date, listed as a string. 
 text_normalized The normalized text of the text if available, listed as a string. 
 location The location of the date as defined by its begin and end indexes.
"end": int
}
},
...
],
"contacts":
{
"name": string,
"role": string
},
...
],
"mentions":
{
"text": string,
"location": {
"begin": int,
"end": int
}
},
...
]
},
...
]
}
Show more



 Schema arrangement 

The Element Classification enrichment is deprecated and will no longer be available, effective 10 July 2020.

The schema is arranged as follows.



* document: An object that lists basic information about the document, including:



* title: The document title, if detected.
* html: The full text of the input document in HTML format.
* hash: The MD5 hash of the input document.



* model_id: The analysis model to be used by the service. For the /v1/element_classification and /v1/comparison methods, the default is contracts. For the /v1/tables method, the default is tables. These defaults apply to the stand-alone methods and to the methods' use in batch-processing requests.
* model_version: The version of the analysis model specified by the value of the model_id parameter.
* elements: An array of the document elements detected by the service.



* location: An object that identifies the location of the element. The object contains two index numbers, begin and end. The index numbers indicate the beginning and ending positions, respectively, of the element as character numbers in the HTML document that the service created from your input document.
* text: The text of the element.
* types: An array that describes what the element is and whom it affects.



* label: An object that defines the type by using a pair of the following elements:



* nature: The type of action the sentence requires. Current values are Definition, Disclaimer, Exclusion, Obligation, and Right.
* party: A string that identifies the party to whom the sentence applies.
* Optional: SIZE of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. (default: 0)



* Flag: --content-length SIZE



* Optional: The base64-encoded 128-bit MD5 digest of the data.



* Flag: --content-md5 MD5



* Optional: A standard MIME type describing the format of the object data.



* Flag: --content-type MIME



* Optional: A MAP of metadata to store.



* Flag: --metadata MAP JSON Syntax: The --metadata flag takes the file:// prefix that is used to load the JSON structure from the specified file.





{
"file_name": "file_20xxxxxxxxxxxx45.zip",
"label": "texas",
"state": "Texas",
"Date_to": "2019-11-09T16:00:00.000Z",
"Sha256sum": "9e39dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8ce6b68ede3a47",
"Timestamp": "Thu, 17 Oct 2019 09:22:13 GMT"
}



* Optional: The REGION where the bucket is present. If this flag is not provided, the program uses the default option that is specified in config.



* Flag: --region REGION



* Optional: Output FORMAT can be only json or text.



* Flag: --output FORMAT









 Upload objects by using S3Manager 



* Action: Upload objects to COS concurrently.
"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/6b45d0aa-e0a6-478b-a5d9-bb45b106676d",
"id": "6b45d0aa-e0a6-478b-a5d9-bb45b106676d",
"name": "Default"
},
"resource_type": "share",
"size": 4800,
"mount_targets": [
{
"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/ff859972-8c39-4528-91df-eb9160eae918/mount_targets/9fdf4438-f5b4-4b6f-8bca-602494fd6c31",
"id": "9fdf4438-f5b4-4b6f-8bca-602494fd6c31",
"name": "mount-target-name1",
"resource_type": "share_target",
"vpc": {
"crn": "crn:...]",
"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/e6ff7b61-feb4-4c87-94aa-277d6f93e164",
"id": "e6ff7b61-feb4-4c87-94aa-277d6f93e164",
"name": "vpc-name1",
"resource_type": "vpc"
}
}
],
"user_tags": [
"env:test",
"env:prod"
],
"zone": {
'FirstNamesUsedInGermanyShort',
'FirstNamesUsedInItaly',
'FirstNamesUsedInFrance',
'Exact',
P.reference);





 ContainsRegex 

The ContainsRegex function checks whether the text of a span matches a given regular expression. This function accepts a regular expression with which to match, an optional flag specification, and the input span against which to match.

ContainsRegex(/<regular expression>/, ['<flags>', ]<span>)

The function returns TRUE if the text of the span, which is taken as a separate Java™ string, contains one or more matches of the regular expression. The function returns null if the span is null. The optional flags affect the matching behavior, similarly to flags used in Java regular expressions.

The flags string is formed by combining one or more of the following flags by using | as the separator:



* CANON_EQ
* CASE_INSENSITIVE
* DOTALL
* LITERAL
* MULTILINE
* UNICODE (meaningless without CASE_INSENSITIVE)
* UNIX_LINES



An example of a flags string is

'UNICODE | CASE_INSENSITIVE'

Consider this example where ContainsRegex identifies product names along with their version number mentions on either sides. Unlike the example for MatchesRegex, a version number match is not strictly identified by using the regex, but by the context around a product name mention containing a token that matches against the regex.

-- dictionary of product names
create dictionary ProductNamesDict as
(
'IBM WebSphere Application Server',
'Microsoft Windows',
'Apple Mac OS',
'IBM Rational Application Developer',
'Apache HTTP Server',
'Eclipse',
'Google Android'
);

-- extract product names from input text
create view ProductNames as
extract
dictionary 'ProductNamesDict'
on D.text as name
from Document D;

-- gather context around product name mention
create view ProductNamesWithContext as
select
P.name as name,
The name cannot be longer than 64 characters.
3. Associate the expression with a class. For example, AGE_REGEX.
4. Click Add Entry.
5. Add the expression.

For example, to capture a number that represents an age (up to age 99), you can specify [0-9]{1,2}. To capture expressions of time, like 12:30 AM, you might specify this regular expression:

(1[0-2]|0?[1-9]):([0-5])(s+[AaPp])?

You can optionally change the minimum and maximum number of word tokens. In English, tokens are often equated to words as delimited by white spaces in a sentence. However, they do not always match one-to-one with words. Other textual elements are considered tokens in some situations. For example, the hyphens in the term 50-year-old each count as a token, which means the total number of tokens used in this term is 5. And the text 12:30 PM contains 4 tokens. (12 | : | 30 | PM)

Click Add.
6. Repeat the previous two steps if you want to add more expressions.
7. Click Save.



The regex editor closes, and the document is displayed. You should see the class that you defined for the regular expression applied to the text that you intended it to match against. If you do not see the annotation, check your expression. It might need to be revised so it matches the text that you intended for it to find.

![The rule editor showing the "Regex" tab selected, a regular expression called "Age" that's associated with the class "AGE_REGEX", and a document that shows the text "50" highlighted in yellow. The highlighted text matches the regular expression that was created.]
Where multiple tags exist for the same image digest within a repository, the ibmcloud cr image-rm command removes the underlying image and all its tags. If the same image exists in a different repository or namespace, that copy of the image is not removed. If you want to remove a tag from an image and leave the underlying image and any other tags in place, use the [ibmcloud cr image-untag](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_image_untag) command.

If you want to restore a deleted image, you can list the contents of the trash by running the [ibmcloud cr trash-list](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_trash_list) command and restore a selected image by running the [ibmcloud cr image-restore](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_image_restore) command.

ibmcloud cr image-rm IMAGE [IMAGE...]



 Prerequisites 

To find out about the required permissions, see [Access roles for using Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-iamaccess_roles_using).





 Command options 

IMAGE
: The name of the image that you want to delete. You can delete multiple images at the same time by listing each image in the command with a space between each name. You can identify images by using either the digest <dns>/<namespace>/<repo>@<digest> or by tag <dns>/<namespace>/<repo>:<tag>. Where <dns> is the domain name, <namespace> is the namespace, <repo> is the repository, <digest> is the digest, and <tag> is the tag.

Images are stored in the trash for 30 days.

To find the names of your images, run one of the following commands:



* To identify your image by digest, run the ibmcloud cr image-digests command.
[Checkmark](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker//images/checkmark-icon.svg) [Location-based events](https://dataplatform.cloud.ibm.com/docs/content/wsj/admin/at-events.htmlwkc) 
 [IBM Watson® Knowledge Studio](https://cloud.ibm.com/docs/watson-knowledge-studio) knowledge-studio ![Checkmark](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker//images/checkmark-icon.svg) [Location-based events](https://cloud.ibm.com/docs/watson-knowledge-studio?topic=watson-knowledge-studio-activity-tracker-events) 
 [IBM Watson® Language Translator](https://cloud.ibm.com/docs/language-translator?topic=language-translator-gettingstarted) language-translator ![Checkmark](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker//images/checkmark-icon.svg) [Location-based events](https://cloud.ibm.com/docs/language-translator?topic=language-translator-at_events) 
 [IBM Watson® Machine Learning](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/ml-overview.html) pm-20 !
To ensure that your application receives enough context to accurately annotate large collections of documents, your test data must include a large sampling of the most important entity types and relation types.

> Important: After you train your first model, you will likely need to make modifications based on the performance statistics. However, to create a reliable statistical model for machine annotation, you want the type system to be as close to final as possible before you begin large-scale annotation tasks.





 When to define roles 

Using roles enables you to define more precise entity types.

Every entity that you add has a role. Unless you change it, the role name is the same as the entity name. You can choose to define a different role for an entity to capture a more nuanced usage of the mention. The word or phrase to which the role applies is literally an example of an entity type, but in the sentence it plays the role of another entity type. For example, in the phrase, the White House vetoed the bill, we can capture more precisely the meaning of the White House if we annotate both the entity type of FACILITY, and a role of ORGANIZATION or PERSON. White House is a building (FACILITY), but represents the government (ORGANIZATION) or the President of the United States (PERSON) in this construction. The entity type plus the role label creates a more precise classification of the mention in the text.

Roles can also provide you with a way to capture relation information without relying on the use of overlapping mentions. For example, you might want to annotate the text 31-year-old male such that it captures the idea that this is a reference to a person with the attribute age of 31 years and attribute gender of male. By examining the text, we determine that 31-year-old is an age, male is a gender, and together they signify a person. You are dealing with 3 entity types, basically: AGE, GENDER, and PERSON. One approach to representing this would be to annotate 31-year-old as AGE, male as GENDER, and because the distinct mention of a PERSON is missing, but male has come to represent person, the word male can have a role of PERSON. You can then capture relations between the PERSON role and all the attributes of a person that you want to capture.
! ! !!! ! ! .<-- </section "id="section-nested" "> --><-- <section "id="section-pair" "> --> pair Analyzes relationships between two fields.<-- <section "id="section-pair-syntax" "> --> Syntax pair(first:{aggregation},second:{aggregation})
The first and second {aggregation} values must be one of the following aggregation types:<-- <ul> --> * term * group_by * histogram * timeslice<-- </ul> -->The relevancy parameter from the term or group_by aggregation is ignored. The pair aggregation type calculates relevancy values by using combinations of document sets from the results of the two aggregations.Only one pair aggregation can be used per query request, and it cannot be combined with any other aggregations.<-- </section "id="section-pair-syntax" "> --><-- <section "id="section-pair-example" "> --> Example For example, you might specify term(model_name) as the first aggregation and term(component_name) as the second. Each of the aggregations returns the following values as keys of aggregated document sets:<-- <ul> --> * term(model_name): Accord, CR-V * term(component_name): engine, brake, radiator<-- </ul> -->The calculated relevancy values of combinations of each of the document sets might look like this:<-- <ul> --> * Accord x engine * Accord x brake * Accord x radiator * CR-V x engine * CR-V x brake * CR-V x radiator<-- </ul> -->The response defines a two-dimensional array of aggregation results, which can be represented in a table.<-- <table "class="row-headers comparison-table" "> -->Table 4. Pair aggregation example This table has row and column headers. The row headers identify car models. The column headers identify car component parts.
--segment_rules SEGMENT_RULES
: Specify the targeting rules that are used to set different values for different segments. Required field - input either as a flag or from file.

--tags TAGS
: Tags associated with the property. Required field - input either as a flag or from file.

--value VALUE
: Property value. Required field - input either as a flag or from file.

--collections COLLECTIONS
: List of collection IDs representing the collections that are associated with the specified property. Required field - input either as a flag or from file.

--file FILE
: Input through a file. File format Supported - JSON





 Example 

To update description a property with ID email-property using flags ([click here](https://cloud.ibm.com/docs/cli?topic=cli-app-configuration-cliac-fileinput) for using commands with '--file' flag), run the following command:

ibmcloud ac property update --environment_id "production" --name Email_Property --property_id email-property --description Email_Property_Updated --value VALUE --tags Updated_Tags --segment_rules '[{"rules":{"segments":"kmu9n7px"]}],"value":"$default","order":1}]' --collections '[]'



 Output 

The command returns the following output:

name Email_Property
value VALUE
segment_rules <Array>
collections -
tags Updated_Tags
property_id email-property
segment_exists true
description Email_Property_Updated
type STRING









 ibmcloud ac property update-values 

You can update the property values(Property value and targeting rules can be updated, however this method does not allow assigning property to a collection.), by using the command:

ibmcloud ac property update-values (--file FILE-PATH | --environment_id ENVIRONMENT_ID --property_id PROPERTY_ID [--name NAME] [--description DESCRIPTION] [--tags TAGS] [--segment_rules SEGMENT-RULES])
@Override
public void onSuccess(List<String> tags) {
System.out.println("Subscribed tags are: "+tags);
}

@Override
public void onFailure(MFPPushException ex) {
String message = ex.getMessage();
System.out.println("Error getting subscriptions " + message);
}
})

// with this

push.getSubscriptions(new ENPushResponseListener<List<String>>() {

@Override
public void onSuccess(List<String> tags) {
System.out.println("Subscribed tags are: "+tags);
}

@Override
public void onFailure(ENPushException ex) {
String message = ex.getMessage();
System.out.println("Error getting subscriptions " +message );
}
})
Show more
* Make changes to tag unsubscribe

// Replace the below section

push.unsubscribe("tagName", new MFPPushResponseListener<String>() {

@Override
public void onSuccess(String s) {
System.out.println("Successfully unsubscribed from " + tag);
}

@Override
public void onFailure(MFPPushException ex) {
String message = ex.getMessage();
System.out.println("Error while unsubscribing from tag "+ message);
}
});

// with this

push.unsubscribe("tagName", new ENPushResponseListener<String>() {

@Override
public void onSuccess(String s) {
System.out.println("Successfully unsubscribed from tag . "+ tag);
}

@Override
If a tag is not specified in the image name, the command fails. You can delete the tags for multiple images by listing each private IBM Cloud registry path in the command with a space between each path.

ibmcloud cr image-untag IMAGE

To find the names of your images, run ibmcloud cr image-list. Combine the content of the Repository column (repository) and Tag column (tag) separated by a colon (:) to create the image name in the format repository:tag.
3. Verify that the tag was removed by running the following command, and check that the tag does not show in the list.

ibmcloud cr image-list

If the list images command times out, see [Why is it timing out when I list images?](https://cloud.ibm.com/docs/Registry?topic=Registry-troubleshoot-image-timeout) for assistance.







 Deleting images from your private repository 

You can delete unwanted images from your private IBM Cloud repository by using either the IBM Cloud console or the CLI.

If you want to delete a private repository and its associated images, see [Deleting a private repository and any associated images](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_images_registry_repo_remove).

Deleting an image that is being used by an existing deployment might cause scale-up, reschedule, or both, to fail.

If you want to restore a deleted image, you can list the contents of the trash by running the [ibmcloud cr trash-list](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_trash_list) command and restore a selected image by running the [ibmcloud cr image-restore](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_image_restore) command.