vania-janet/multiturn-rag-retrieval-data huggingface dataset:
System.out.println(deleteTagResults.toString());

delete_tag_results = global_tagging_service.delete_tag(
tag_name='env:example-access-tag',
tag_type='access').get_result()

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

deleteTagOptions := globalTaggingService.NewDeleteTagOptions("env:example-access-tag")
deleteTagOptions.SetTagType("access")

deleteTagResults, response, err := globalTaggingService.DeleteTag(deleteTagOptions)
if err != nil {
panic(err)
}
b, _ := json.MarshalIndent(deleteTagResults, "", " ")
fmt.Println(string(b))

const params = {
tagName: 'env:example-access-tag',
tagType: 'access',
};

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





 Deleting all unused tags 

Deleting all unused access management tags from the account:



* Curl
* Java
* Python
* Go
* Node



curl -X DELETE -H "Authorization: {iam_token}" -H "Accept: application/json" "https://tags.global-search-tagging.cloud.ibm.com//v3/tags?tag_type=access"

DeleteTagAllOptions deleteTagAllOptions = new DeleteTagAllOptions.Builder()
.tagType("user")
.build();
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.](images/rule_step3.png "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.")
6. To define a rule, click Rules from the navigation.
7. Open the document with the pattern that you want to capture as a rule. For example, if you created a document titled, My Document with the sample text that contains the phrase 50-year-old, open that document.
8. From the text in the document, select the characters that illustrate the pattern that you want to capture. For example, you can select the following words and hyphens (-):

50-year-old

After you select characters, then you can add a rule.
9. Click the plus sign (+) in the Rules panel.

The rule editor represents the text that you selected as two layers of cells. The cells in the top layer are where you annotate the classes of the underlying tokens. The lower layer is where you define the conditions by which the tokens participate in the pattern.

![The rule editor that shows the "Create a rule" panel.](images/rule_step4.png "The rule editor that shows what the "Create a rule" panel looks like after you select text from your document and click the plus sign in the "Rules" panel. The following graphical elements are shown: the "Rule name" field with the term "AGE" entered, the "Create a rule" panel, and the "Class" panel.
Editing bucket description and tags 

To edit the description and tags of a bucket, use one of the following methods:



*  Editing bucket description and tags in list view





1.  Click the name of bucket. The bucket information page opens.
2.  In the Details tab, click Edit.
3.  In the Description field, enter the description of the bucket or edit the existing description.
4.  In the Tags field, select the tags from the list or start typing to define a new tag.
5.  Click Save.





*  Editing bucket description and tags in topology view





1.  Click the bucket. The bucket information page opens.
2.  In the Details tab, click Edit.
3.  In the Description field, enter the description of the bucket or edit the existing description.
4.  In the Tags field, select the tags from the list or start typing to define a new tag.
5.  Click Save.
Operators are the separators between different parts of a query.



 . (JSON delimiter) 

This delimiter separates the levels of hierarchy in the JSON schema

For example, the following query argument identifies the section of the enriched_text object that contains entities and the text recognized as an entity.

enriched_text.entities.text

The JSON representation of this section looks as follows:

Zoom

![JSON source that shows the enriched_text.entities.text object structure](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/api-placement.png)

Figure 1. JSON representation of the enriched_text.entities.text field





 : (Includes) 

This operator specifies inclusion of the full query term.

For example, the following query searches for documents that contain the term cloud computing in the text field:

{
"query":"enriched_text.entities.text:"cloud computing""
}

The includes operator does not return a partial match for the query term. If you want to find a partial match for a term, use a wildcard operator with the includes operator. For example, if you want to find any occurrences of TP53 or p53 in the test_results field, the following query will not find occurrences of both terms:

{
"query":"test_results:P53"
}

Instead, include a wildcard in the request. For example, use the following query request. Because we are using the wildcard operator, we also changed the term to lowercase.

{
"query":"test_results:p53"
}

With this syntax, occurrences of p53, tp53, P53, or TP53 are all returned.





 "" (Phrase query) 

Phrase queries only match occurrences of the whole phrase. The order of the words in the phrase must match.
curl -X POST -H "Authorization: {iam_token}" -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "resources": [{ "resource_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4::" }], "tag_names": ["project:myproject"] }' "https://tags.global-search-tagging.cloud.ibm.com/v3/tags/detach?tag_type=access"

Resource resourceModel = new Resource.Builder().resourceId(resourceCRN).build();
DetachTagOptions detachTagOptions = new DetachTagOptions.Builder()
.addResources(resourceModel)
.addTagNames("project:myproject")
.tagType("access")
.build();

Response<TagResults> response = service.detachTag(detachTagOptions).execute();
TagResults tagResults = response.getResult();
System.out.println(tagResults.toString());

resource_model = {'resource_id': resource_crn}

tag_results = global_tagging_service.detach_tag(
resources=[resource_model],
tag_names=['project:myproject'],
tag_type='access').get_result()

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

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

detachTagOptions := globalTaggingService.NewDetachTagOptions(
extract I.href as href,
regex /[A-Z]+/ on 1 token in I.anchortext as word
from InterestingLinks I;

-- Map spans in the InterestingWords view back to the original
-- HTML or XML source of the document.
create view InterestingWordsHTML as
select I.href as href, Remap(I.word) as word
from InterestingWords I;
Show more





 Documenting the detag statement with AQL Doc 

The AQL Doc comment for a detag statement contains the following information:



* General description about the function of the statement.
* @field for each text field of the input view on which to do the detag process.
* @auxView specifies the view name.
* @auxViewField specifies the fully qualified column name of the view.



/
* Detags the input document
* @field text the detagged text of the document
* @auxView Anchor stores the anchor points from tagged doc
* @auxViewField Anchor.linkTarget stores the href attribute of anchor tag
/

detag Document.text as DetaggedDoc
annotate element 'a' as Anchor
with attribute 'href' as linkTarget;







 The create dictionary and create external dictionary statements 

The create dictionary and create external dictionary statements are used to define dictionaries of words or phrases to identify matching terms across input text through extract statements or predicate functions. The create dictionary statement allows the specification of dictionary content in source AQL code, and the dictionary content is serialized inside the compiled representation of the module (the .tam file). The create external dictionary statement allows you to specify the dictionary content when the extractor is instantiated, instead of in source AQL code, and you do not have to recompile the module. Therefore, external dictionaries are powerful constructs that allow the AQL developer to expose customization points in a compiled module.

Dictionaries can be created from three sources:



* Dictionary files
* Inline dictionary declarations
* Tables that are created with the create table statement and the create external table statement.





 Syntax
"description": "<workspace_description>",
"tags": [],
"template_repo": {
"url": "<github_source_repo_url>"
},
"template_data": [
{
"folder": ".",
"type": "<terraform_version>",
"env_values":
{
"VAR1":"<val1>"
},
{
"VAR2":"<val2>"
}
],
"variablestore":
{
"name": "<variable_name_x>",
"value": "<variable_value_x>",
"type": "string",
"secure": true,
"description":"<description>"
},
{
"name": "<variable_name_x>",
"value": "<variable_value_x>",
"type": "bool",
"secure": false,
"description":"<description>"
},
{
"name": "<variable_name_x>",
"value": "<variable_value_x>",
"type": "list(string)",
"secure": false,
"description":"<description>"
},
{
"name": "<variable_name_x>",
"value": "<variable_value_x>",
"type": "map(number)",
"secure": false,
"description":"<description>"
},
{
"name": "<variable_name_x>",
"value": "<variable_value_x>",
"type": "tuple(string, list(string), number, bool])",
"secure": false,
push.subscribeToTags(tagsArray: ["<tag_name>"], completionHandler: { (response, statusCode, error) -> Void in

/...../
}

// with this
push.subscribeToTags(tagName: "<tag_name>") {
response, statusCode, error in

/...../
});
* Changes to the get all tag subscription for the device

// Replace this

push.retrieveSubscriptionsWithCompletionHandler(completionHandler: { (response, statusCode, error) -> Void in

/...../
}

// with this

push.retrieveSubscriptionsWithCompletionHandler {
response, statusCode, error in

/...../
}
* Changes to the tag unsubscribe

// Replace this

push.unsubscribeFromTags(tagsArray: ["<tag_name>"], completionHandler: {
(response, statusCode, error) -> Void in

/...../
}

// with this

push.unsubscribeFromTags(tagName: "<tag_name>") {
response, statusCode, error in

/...../
}
Show more



6. Optionally, if you are using Notification options, make the following changes:



* Initialize the class

// Replace this

let notificationOptions = BMSPushClientOptions()
notificationOptions.setInteractiveNotificationCategories(
categoryName: [category])
push.initializeWithAppGUID(
appGUID: "<IBM Cloud Push Instance GUID>",
clientSecret:"<IBM Cloud Push Instance ClientSecret>",
options: notificationOptions)

// with this

let notificationOptions = ENPushClientOptions()
* Works well with questions with longer phrase or clause answers.



* Example question: How do I flip a pancake?
* Passage: The key to getting a world-class pancake is flipping it properly. The best way to flip a pancake is to stick a spatula under it, lift it at least 4 inches in the air, and quickly rotate the spatula 180 degrees.



* Many how or why questions are only fully answered by much longer spans of text. The answer-finding feature does not return a whole document as the answer (and it doesn't summarize a document length answer).
* Handles yes or no questions that are factual and have a concise answer in the text



* Example question: Is there a library in Timbuktu
* Passage: Timbuktu's main library, officially called the Ahmed Baba Institute of Higher Islamic Studies and Research, is a treasure house that contains more than 20,000 manuscripts that cover centuries of Mali's history.



* Handles questions with very short answers, such as names and dates, especially when the type of answer that is required is explicit in the text.
* Handles opinion questions, but only by finding a statement of that opinion; it does not assess the validity of the opinion.



* Example question: Should I try blue eyeshadow?
* Passage: We think blue eye shadow is trending this year.







 How the answer-finding feature works 

After a user submits a query, the query is analyzed by the Discovery service. Query analysis transforms the user's original query in ways that improve the chances of finding the best search results. For example, it lemmatizing words, removes stop words, and adds query expansions. The search is performed and the resulting documents and passages are returned.

Answer finding is applied to the returned passages. Up to 60 passages are sent to the answer-finding service. How these 60 passages are chosen differs based on the passages.per_document parameter value.



* If passages.per_document is false, the top 60 passages from all of the documents that are returned by search are chosen based on their passage scores only.
* If passages.per_document is true, the returned documents are ranked first, and then the top 60 passages from these top documents are chosen.
<xsd:element name="module">
<xsd:annotation>
<xsd:documentation>The single table module.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="xsd" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Describes XSD this module is compliant: "https://ibm.com/daas/module/1.0/module.xsd"</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="source"/>
<xsd:element ref="table"/>
<xsd:element name="label" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Usefull to locate the module in UI</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="identifier" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Required to identify the module for referencing</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="propertyType">
<xsd:annotation>
<xsd:documentation>Generic property container.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="value" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
[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 ![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.htmlwml) 
 [IBM Watson® Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-understanding) natural-language-understanding ![Checkmark](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker//images/checkmark-icon.svg) [Location-based events](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-at_events) 
 [IBM Watson® Speech to Text](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-gettingStarted) speech-to-text !
In addition, the syntax allows a special token gap construct to be specified in a sequence expression to indicate a match between min and max number of tokens.
* <token>

A match for any token.
* [return clause]

Generates extracted values for each match of the pattern expression according to the return clause. The return clause has the same semantics as the return clause in an extract regex statement.
* [with inline_match on <viewname.colname>]

For the Atoms such as string and regex Atoms, the with inline_match clause determines which text object the system uses for string or regex extraction. For example, if the clause is with inline_match on Email.subject, then all dictionaries and regular expressions defined inline in the pattern specification are applied to the subject field of the Email view. If the with inline_match is absent, string and regular expression extraction are run by default on the entire Document.text. In this case, viewname must be the name of a view or table that is defined in the current module, or imported from another module; references to table functions are not allowed in the with inline_match clause.
* [with language as <language code(s)>]

Specifies a comma-delimited list of two-letter language codes, such as en (English) or zh (Chinese) for the languages on which to evaluate the string. There is no match on documents whose language code is not contained in this string. If the language parameter is omitted, the evaluation language defaults to one of the following language sets:



* If it is declared, the language sets that are specified through the set default language statement in the containing module.
* The language sets that contain German (de), Spanish (es), English (en), French (fr), Italian (it), and the unspecified language (x_unspecified)









 Usage notes 



* The semantics of an extract pattern statement is driven by the pattern specification. Each match constructs an output result according to the return clause of the pattern specification and the select list at the top of the extract statement. The results are filtered and consolidated according to the having, consolidate, and limit clauses of the extract statement.
In a dictionary, individual lexical items are assigned part of speech (POS) tags. For example, the word 'fly' can be identified as a verb or a noun.
* performance

The measurement of a Watson system in terms of accuracy, precision, and recall, for example, when answering questions, discovering relationships, or annotating text.
* pre-annotation

The process of annotating a set of documents prior to human annotation. Documents can be pre-annotated by using a rule-based model, a machine-learning model, IBM Watson™ Natural Language Understanding, or a dictionary. Pre-annotation can help human annotators more quickly prepare a set of ground truth documents.
* precision

A measurement that specifies the proportion of results that are relevant. Precision, which is a positive predictive value, is determined by the number of correct positive results divided by the number of all positive results. Accuracy is best measured by using both precision and recall. See also [accuracy](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-glossarygloss_A) and [recall](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-glossarygloss_R).
* processing engine archive (PEAR)

A .pear archive file that includes an Unstructured Information Management Architecture (UIMA) analysis engine and all of the resources that are required to use it for custom analysis.







 R 



* recall

A measurement that specifies the percentage of relevant results returned, out of all available relevant results. Recall, which is a measure of sensitivity, is determined by the number of correct positive results divided by the number of positive results that should have been returned. Accuracy is best measured by using both precision and recall.
* "level": INT - required - the HTML h level that text identified with these parameters are converted into.
* "min_size": INT - optional - the smallest font size that is identified as this heading level.
* "max_size": INT - optional - the largest font size that is identified as this heading level.
* "bold": boolean - optional - When true only bold fonts are identified as this heading level.
* "italic": boolean - optional - When true only italic fonts are identified as this heading level.
* "name": "string" - optional - The name of the font that is identified as this heading level.



For an area of text to be identified as a heading in the font array it must match all of the parameters defined in the specific array item. If the parameters defined are too flexible, you might have more headings identified than you anticipated. Your results are better if you strictly define each heading level multiple times to ensure all heading level variations are included without invalid matches.

Each item in the styles array specifies a heading level from the Microsoft Word styles that are applied to that paragraph.



* "level": INT - required - the HTML h level that text identified with these parameters are converted into.
* "names": array - required - a comma separated array of style names that is identified as this heading level.







 HTML 

"html": {
"exclude_tags_completely": [
"script",
"sup"
],
"exclude_tags_keep_content": [
"font",
"em"
],
"exclude_content": {
"xpaths": [
"//@id='list-old']",
"//@id='unstable']"
]
},
"keep_content": {
"xpaths": [
"//@id='footer']",
"//@id='header']"
]
},
"exclude_tag_attributes": [
"EVENT_ACTIONS"
],
* --attach-tags: User tags to attach to each resource that was created by this plan.
* --copy-tags: Indicates whether to copy the source user tags to the created resource. One of: true, false.
* --cron-spec: The cron specification for the backup schedule.
* --delete-after: The maximum number of days to keep each backup after creation.
* --delete-over-count: The maximum number of recent backups to keep. If unspecified, all backups are kept.
* --clone-policy-max-snapshots: The maximum number of recent snapshots (per source) that keep clones. (default: 5).
* --clone-policy-zones: The zone that this backup policy plan creates snapshot clones in.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is backup-policy-plan-delete 

Delete one or more backup policy plans.

ibmcloud is backup-policy-plan-delete (PLAN1 PLAN2 ...) [--output JSON] [-f, --force] [-q, --quiet]



 Command examples 



* ibmcloud is backup-policy-plan-delete backup-policy-1001 437cc10e-eaa5-4eaf-8e9d-5ba5d659f9a1 ec5446a2-5f28-4d25-a501-b6fa14f3c5d8
* ibmcloud is backup-policy-plan-delete aaa-default-backup-policy-1 my-policy-plan-2 my-policy-plan-3 my-policy-plan-4







 Command options 



* PLAN1: ID or name of the backup policy plan.
* PLAN2: ID or name of the backup policy plan.
* --output: Specify output format, only JSON is supported. One of: JSON.
-- offsets relative to the blog entries themselves, as opposed
-- to the original multi-entry document.
create view CompanyName as
extract dictionary 'CompanyNameDict' on B.body as name
from BlogEntryDoc B;

output view CompanyName;
Show more





 LeftContext and RightContext 

The LeftContext function takes a Span and an Integer as input:

LeftContext(<input span>, <nchars>)

The LeftContext(<input span>, <nchars>) function returns a new span that contains the nchars characters of the document immediately to the left of <input span>. If the input span starts less than <nchars> characters from the beginning of the document, then LeftContext() returns a span that starts at the beginning of the document and continues until the beginning of the input span.

For example, LeftContext([20, 30], 10) returns the span [10, 20]. The span LeftContext([5, 10], 10) returns [0, 5].

If the input starts on the first character of the document, LeftContext() returns a zero-length span. Similarly, the RightContext function returns the text to the right of its input span. For both functions, if either argument is null, the function returns null.





 LeftContextTok and RightContextTok 

The LeftContextTok and RightContextTok functions are versions of LeftContext and RightContext that take distances in terms of tokens:

LeftContextTok(<input span>, <num tokens>)
RightContextTok(<input span>, <num tokens>)

The following example illustrates the use of the RightContextTok function.

create view Salutation as
extract
regex /Mr.|Ms.|Miss/
on D.text as salutation
from Document D;

--Select the token immediately following a Salutation span
create view NameCandidate as
select RightContextTok(S.salutation, 1) as name
from Salutation S;