vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Each object lists the span (beginning and end location) of the corresponding paragraph.



* location: The location of the paragraph in the input document as defined by its begin and end indexes.













 Elements 

The Contract enrichment generates an analysis of each identified element in the contract. The following sections describe each type of element that is generated.



 Types 

The types array includes a number of objects, each of which contains nature and party keys whose values identify a couplet for the element.

The following tables list the possible values of the nature and party keys.



Supported keys

 nature Description 

 Definition This element adds clarity for a term, relationship, or similar. No action is required to fulfill the element, nor is any party affected. 
 Disclaimer The party in the element is not obligated to fulfill the terms that are specified by the element but is not prohibited from doing so. 
 Exclusion The party in the element will not fulfill the terms that are specified by the element. 
 Obligation The party in the element is required to fulfill the terms specified by the element. 
 Right The party in the element is guaranteed to receive the terms specified by the element. 



Each nature key is paired with a party key, which contains either the name or the role of the party or parties that apply to the nature (examples include, but are not limited to, Buyer, IBM, or All Parties). For the Definition nature, the party is always None.





 Parties 

The parties array specifies the participants that are listed in the contract. Each party object is associated with other objects that provide details about the party, including:



* role: The party's role. Values are listed in the table that follows this list.
* importance: The importance of the party. Possible values are Primary for a primary party and Unknown for a non-primary party.
* addresses: An array that identifies addresses.



* text: An address.
* location: The location of the address as defined by its begin and end indexes.



* contacts: An array that defines the names and roles of contacts that are identified in the input document.



* name: The name of a contact.
* role: The role of the contact.



* mentions: n array of objects that identify mentions of the party.
An SSML element is anything contained within, and including, an opening tag and its matching closing tag. As shown in the following example, an element can contain a combination of other elements (tags can be nested) and text. Additionally, elements can require or optionally accept attributes set to particular values.

<tag1>
<tag2 attributeName="attributeValue">
... some text ...
</tag2>
</tag1>

A full legal SSML document consists of an XML prolog, which contains information such as encoding and the schema against which to validate the SSML document, followed by the root element, <speak>. Within the span of the <speak> element, you specify the text that is to be synthesized, augmented with additional elements.


<?xml version="1.0" encoding="UTF-8"?>


<speak version="1.1">
... the body that contains text to be synthesized plus markup ...
</speak>

The XML prolog is not needed for text that you pass to the service. The service supports SSML fragments, which are SSML elements that do not include the full XML header and do not need to include their parent elements. For example, the <?xml> and <speak> elements are always optional for SSML that you send for synthesis.





 SSML support 

For more information about using SSML and related features with the service, see the following:



* The service implements most of the W3C specification and supports SSML fragments.



* For complete information about the service's level of support for all SSML elements, see [SSML elements](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-elements).
* For examples of using SSML elements with the text of a speech synthesis request, see [Examples of input text](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-usingHTTPhttpExamples).



* The service supports additional synthesis features for enhanced neural and expressive neural voices:
on CW.word as capswords
from CapitalizedWords CW;

Example 2: Extract blocks of words within a token range

The following code identifies blocks of exactly two capitalized words within five tokens of each other.

create view TwoCapitalizedWords as
extract blocks
with count 2
and separation between 0 and 5 tokens
on CW.word as capswords
from CapitalizedWords CW;







 Part of speech 

Use the part-of-speech extraction specification to identify locations of different parts of speech across the input text.



 Syntax 

part_of_speech
'<part of speech spec>'
[and '<part of speech spec>']
[with language '<language code>']
[and mapping from <mapping table name>]
on <input column> as <output column>
from <input view>





 Description 



* '<part of speech spec>'

Identifies the parts of speech to extract from the input text. The '<part of speech spec>' is one of the following strings:



* A string that contains a comma-delimited list of part-of-speech tags that are generated by the Multilingual tokenizer
* A combination of an internal part-of-speech name and flags, as defined by a mapping table



* [and '<part of speech spec>']

Identifies the additional parts of speech tags for extraction.
* [with language '<language code>']

Specifies the language to be used in the extraction. The <language code> is a two-letter, lowercase language code, such as 'en' or 'ja'. If this argument is omitted, the language for part-of-speech extraction is assumed to be English
* [and mapping from <mapping table name>]

Specifies the name of an AQL table that maps raw part-of-speech tags such as "NOUN" to combinations of high-level parts of speech and flags. While the optional mapping table can have variable names, a part-of-speech mapping table is required to have these column names:



* tag

The column that holds a Multilingual tokenizer part-of-speech tag.
* basetag
--tags TAGS (optional)
: Filter features by a list of comma-separated tags.

--sort SORT (optional)
: Sort the details based on the specified attribute.





 Example 

To list all features, run the following command:

ibmcloud ac feature list --environment_id "production"



 Output 

The command returns the following output:

name feature_id segment_exists
Indian IBMers ibm-discount true
sampleFeature sampleFeature true
Cycle Rentals cycle-rentals true









 ibmcloud ac feature create 

You can create a feature, by using the command:

ibmcloud ac feature create {--file FILE-PATH | --environment_id ENVIRONMENT_ID --name NAME [--feature_id FEATURE_ID] --description DESCRIPTION --type TYPE --enabled_value ENABLED_VALUE --disabled_value DISABLED_VALUE --tags TAGS --enabled ENABLED --segment_rules SEGMENT_RULES --collections COLLECTIONS}



 Command options 

--environment_id ENVIRONMENT_ID
: Environment ID

--name NAME
: Feature name. Required field - input either as a flag or from file.

--feature_id FEATURE_ID (optional)
: Feature ID. If this value is not provided, name will automatically become the ID. Optional field - input either as a flag or from file.

--description DESCRIPTION
: Description of the feature. Required field - input either as a flag or from file.

--type TYPE
: Type of the feature (Boolean, String, Number). Required field - input either as a flag or from file.

--enabled_value ENABLED_VALUE
: Value of the feature when it is enabled. Required field - input either as a flag or from file.

--disabled_value DISABLED_VALUE
: Value of the feature when it is disabled. Required field - input either as a flag or from file.

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

--segment_rules SEGMENT_RULES
See the following table for some examples of tags that you might want to use.



Table 1. Tag syntax

 Tag Description 

 env:dev, env:test, env:stage, env:prod Use to identify or even manage access to your development environment 
 project:lw-wizard, app:poc-app Use to identify or even manage access to a project 
 dataresidency:germany, compliance:hipaa, compliance:pii Use to define compliance requirements 
 schedule:24x7, maxruntime:12days Use to help you automate optimization 









 Creating tags 



 Creating user tags 

You don't need to create user tags to attach them to resources or service IDs. For more information, see [Attaching and detaching tags](https://cloud.ibm.com/docs/account?topic=account-attaching-and-detaching-tags-on-a-resource).





 Creating access management tags in the console 

Before you can attach your access management tags to individual resources or service IDs, you need to create them first. To create access management tags, you must have the administrator role on either the Tagging Service or on All Account management services.

IBM Cloud® allows up to 250 access management tags per account.



1. Go to Manage > Account in the IBM Cloud® console, and select Tags.
2. Click Access management tags.
3. Type the names of your tags, and click Create Tags. These tags are now ready to be attached to resources or service IDs, and to scope access policies.



Next, see [Attaching and detaching tags](https://cloud.ibm.com/docs/account?topic=account-attaching-and-detaching-tags-on-a-resource). For a full tutorial, see [Controlling access to resources by using tags](https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial).





 Creating access management tags by using the CLI 

Before you can attach your access management tags to individual resources or service IDs, you need to create them first.
* Colons turn the tag into a string where you can isolate two logical parts, like a key:value pair. You can't use a colon in a tag without creating this pairing.
* A comma separates tags and can't be used within the tag name itself.



If you add PII information in the name, you might be disclosing sensitive data to others in the same account.

When you define your tags, do not add sensitive information in the tag name.

Tags are visible to all members of an account.

To control tag visibility, circulate tagging guidelines, and let users know that tags are visible account-wide.







 Define the IAM strategy 

Use IBM Cloud® Identity and Access Management (IAM) to securely authenticate users and service IDs, and to control access to all cloud resources and data consistently in the IBM Cloud.

If you add PII information in the name or description of IAM resources, you might be disclosing sensitive data to others in the same account.

When you define your IAM resources, do not add sensitive information in their names and descriptions.



 Access groups 

You can assign permissions to work with the IBM Cloud Activity Tracker service within the context of the service, a resource group, or an access group.

Use access groups to organize a set of users and service IDs into a single entity that makes it easy for you to manage IAM permissions.

You can create multiple access groups.

Define a minimum of 4 access groups:



Table 2. List of access groups

 Access group Description 

 Administrators Users in this group should have permissions to fully manage the service and grant other users in the account permissions to work with the service in the IBM Cloud. 
 Managers Users in this group should have permissions to fully manage the service in the IBM Cloud. 
 Advanced service users Users in this group should have permissions to run advanced service tasks. 
 Users Users in this group should have permissions to run basic tasks. 







 Policies 

A policy determines the full set of actions that a user or service ID can perform.

For each access group, define a policy for each resource group that defines the level of access to that resource group.
* location: The location of the paragraph in the input document as defined by its begin and end indexes.





* parties: An array that defines the parties that are identified by the service.



* party: A string that provides the normalized form of the party's name.
* role: A string that identifies the role of the party.
* importance: A string that identifies the importance of the party. Possible values include Primary for a primary party and Unknown for a non-primary party.
* addresses: An array of objects that identify addresses.



* text: A string that contains the address.
* location: The location of the address as defined by its begin and end indexes.



* contacts: An array that defines the name and role of contacts that are identified in the input document.



* name: A string that lists the name of an identified contact.
* role: A string that lists the role of the identified contact.



* mentions: An array of objects that identify mentions of the party.



* text: A string that lists the name of the party.
* location: The location of the mention as defined by its begin and end indexes.









 location object 

The location object is included with most of element definitions. The object identifies the location of the text string or number that represents the element. The object contains two index numbers, begin and end. The index numbers indicate the beginning and ending positions of the characters in the mention.

For example, a text string with the value Amount due might have a corresponding location object that looks as follows:

{
...
"location": {
"begin": 2510,
"end": 2519
}
...
}

The begin index indicates that the string begins at character position 2510 in the transformed HTML, which is the location of the letter A in Amount. The end index indicates that the string ends at character position 2519, which is the location of the letter e in due.







 Document structure 

The output of the Contracts enrichment includes a document_structure object that details the structural composition of the input document. The document structure information is represented in the following JSON sample. The object is located immediately after the root-level tables array.
--tags TAGS (optional)
: Filter segments by a list of comma-separated tags.

--sort SORT (optional)
: Sort the details based on the specified attribute.





 Example 

To list all properties, run the following command:

ibmcloud ac property list --environment_id "production"



 Output 

The command returns the following output:

collections name property_id description type value tags segment_rules
- Email property email-property Property for email Update BOOLEAN false version: 1.1, pre-release -
- name name desc NUMERIC 1 tags -









 ibmcloud ac property create 

You can create a property, by using the command:

ibmcloud ac property create (--file FILE-PATH | --environment_id ENVIRONMENT_ID --name NAME [--property_id PROPERTY_ID] --description DESCRIPTION --type TYPE --value VALUE --tags TAGS --segment_rules SEGMENT-RULES --collections COLLECTIONS)



 Command options 

--environment_id ENVIRONMENT_ID
: Environment ID

--name NAME
: Property name. Required field - input either as a flag or from file.

--property_id PROPERTY_ID (optional)
: Property ID. If this value is not provided, name will automatically become the Id. Optional field - input either as a flag or from file.

--description DESCRIPTION
: Description of the property. Required field - input either as a flag or from file.

--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.

--type TYPE
: Property type. 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.
"//@id='list-old']",
"//@id='unstable']"
]
},
"keep_content": {
"xpaths": [
"//@id='footer']",
"//@id='header']"
]
},
"exclude_tag_attributes": [
"EVENT_ACTIONS"
],
"keep_tag_attributes": [
"id"
],
"extracted_fields": {
"{field_name}": {
"css_selector": "{CSS_selector_expression_1}",
"type": "{field_type}"
}
}
},
Show more



 exclude_tags_completely 

"exclude_tags_completely" : array - An array of HTML tag names that are excluded. This includes the tag, the content and any tag attributes that are defined.





 exclude_tags_keep_content 

"exclude_tags_keep_content" : array - An array of HTML tag names where the tag information is removed. This results in the HTML tag and any tag attributes being stripped. The content of the tag is not further stripped unless specified. For example if you specify exclude_tags_keep_content for the span HTML tag, then <span class="info">Some <strong>Information</strong></span> is stripped to: Some <strong>Information</strong>





 exclude_content 

"xpaths" : array - An array of XPaths that identify content that is removed. If this value is set, anything that matches one of the XPaths are removed from the output.





 keep_content 

"xpaths" : array - An array of XPaths that identify content that is converted. If this value is set, anything that matches one of the XPaths are included in the output. The inclusions specified by this parameter are processed after any processing specified by exclude_content.





 exclude_tag_attributes
* document_structure: An object that describes the structure of the input document.



* section_titles: An array that contains one object per section or subsection that is detected in the input document. Sections and subsections are not nested. Instead, they are flattened out and can be placed back in order by using the begin and end values of the element and the level value of the section.



* text: A string that lists the section title, if detected.
* location: The location of the title in the input document as defined by its begin and end indexes.
* level: An integer that indicates the level at which the section is located in the input document. For example, 1 represents a root-level section, 2 represents a subsection within the level 1 section, and so on.
* element_locations: An array that contains objects that specify the begin and end values of the sentences in the section.



* leading_sentences: An array that contains one object per leading sentence of a list or subsection, in parallel with the section_titles and paragraph arrays. The object details the leading sentences in the matching section or subsection. As in the section_titles array, the objects are not nested. Instead, they are flattened out and can be placed back in order by using the begin and end values of the element or any level markers in the input document.



* text: A string that lists the leading sentence, if detected.
* location: The location of the leading sentence in the input document as defined by its begin and end indexes.
* element_locations: An array that contains objects that specify the begin and end values of the leading sentences in the section.



* paragraphs: An array that contains one object per paragraph, in parallel with the section_titles and leading_sentences arrays. Each object lists the span (beginning and end location) of the corresponding paragraph.



* location: The location of the paragraph in the input document as defined by its begin and end indexes.













 Elements 

The Contract enrichment generates an analysis of each identified element in the contract. The following sections describe each type of element that is generated.



 Types 

The types array includes a number of objects, each of which contains nature and party keys whose values identify a couplet for the element.
: The ID of the account that owns the resources to be tagged (required if tag-type is set to service).

-q, --quiet
: Suppress verbose output.





 Examples 



* To attach the user tag MyTag to a Kubernetes cluster named MyCluster, first look for the CRN of the cluster you would like to tag:

ibmcloud resource search 'type:k8-cluster AND name:MyCluster'

Take note of the CRN, which is a string similar to the following example:

crn:v1:bluemix:public:containers-kubernetes:us-south:a/a27a4741a57dcf5c965939adb66fe1c7:a46242e638ca47b09f10e9a3cbe5687a::

To attach the tag, run the following command:

ibmcloud resource tag-attach --tag-names MyTag --resource-id rn:v1:bluemix:public:containers-kubernetes:us-south:a/a27a4741a57dcf5c965939adb66fe1c7:a46242e638ca47b09f10e9a3cbe5687a::
* To attach the user tag MyTag to a resource named MyResource:

ibmcloud resource tag-attach --tag-name MyTag --resource-name 'MyResource'
* To attach the user tag MyTag to a classic infrastructure virtual guest named MyVM, first look for the ID of the virtual guest you would like to tag:

ibmcloud resource search 'fullyQualifiedDomainName:MyVM _objectType:SoftLayer_Virtual_Guest' -p classic-infrastructure

Take a note of the ID, which is a string similar to 48373549.

To attach the tag, run the following command:

ibmcloud resource tag-attach --tag-names MyTag --resource-id 48373549 --resource-type SoftLayer_Virtual_Guest
tag_type='user').get_result()

print(json.dumps(tag_results, indent=2))

resourceModel := &globaltaggingv1.Resource{
ResourceID: &serviceidCRN,
}

detachTagOptions := globalTaggingService.NewDetachTagOptions(
[]globaltaggingv1.Resource{resourceModel},
)
detachTagOptions.SetTagNames([]string{"tag_test_1", "tag_test_2"})
detachTagOptions.SetTagType("user")

tagResults, response, err := globalTaggingService.DetachTag(detachTagOptions)
if err != nil {
panic(err)
}
b, _ := json.MarshalIndent(tagResults, "", " ")
fmt.Println(string(b))

const resourceModel = {
resource_id: serviceidCrn,
};

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

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



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.
"search_cursor": "..."
}

You can also use the [Get tags](https://cloud.ibm.com/apidocs/tagginglist-tags) API with the attached_to query parameter to obtain the same result. However, the Get tags API is strictly rate limited and doesn't return all of the tag types in a single call as the /v3/resources/search does which is the reason it's not the suggested method.

If you need to accomplish the task by using the ibmcloud command line, then use the resource search command. By default, it outputs all of the tags that are attached to the resources.

For example, if you use the command ibmcloud resource search name:my-codeengine-instance, you get the following output:

Name: my-codeengine-instance
Location: us-south
Family: resource_controller
Resource Type: resource-instance
Resource Group ID: a58ebff30cab4b30bc67de9fec9cfda5
CRN: crn:v1:staging:public:codeengine:us-south:a/aa00ffbccdb34a6fbe7a6499ce091aaa:0a01030b-1234-1234-aaaa-002245318e88::
Tags: one,two
Service Tags: service-tag:one,service-tag:two
Access Tags: atag:one,another-tag:two





 Tagging for resellers 

All tags are visible to all members of an account. To view the policy of an access management tag, the user must be assigned at least a viewer role on the tagged resource. If your account is associated with different organizations, if you're a reseller for example, you might want to recommend your customers not to store sensitive information in tags.

To control tag visibility, circulate tagging guidelines and let users know that tags are visible account-wide.

Use codes rather than names for clients and accounts and avoid placing sensitive information in tags.