From a6fefff33d94445079b9c311b31be6fce9060301 Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Tue, 7 Jan 2020 15:49:06 -0500 Subject: [PATCH] Fix semantic equivalence documentation --- docs/guide/equivalence.ipynb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/guide/equivalence.ipynb b/docs/guide/equivalence.ipynb index 41b24ed..05d0d99 100644 --- a/docs/guide/equivalence.ipynb +++ b/docs/guide/equivalence.ipynb @@ -1540,7 +1540,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can also retrieve the detailed results in a dictionary so the detailed results information can be accessed and used more programatically. The [`semantically_equivalent()`](../api/stix2.environment.rst#stix2.environment.Environment.semantically_equivalent) function takes an optional third argument, called `prop_scores`. This argument should be a dictionary into which the detailed debugging information will be stored.\n", + "You can also retrieve the detailed results in a dictionary so the detailed results information can be accessed and used more programatically. The [semantically_equivalent()](../api/stix2.environment.rst#stix2.environment.Environment.semantically_equivalent) function takes an optional third argument, called `prop_scores`. This argument should be a dictionary into which the detailed debugging information will be stored.\n", "\n", "Using `prop_scores` is simple: simply pass in a dictionary to `semantically_equivalent()`, and after the function is done executing, the dictionary will have the various scores in it. Specifically, it will have the overall `matching_score` and `sum_weights`, along with the weight and contributing score for each of the semantic equivalence contributing properties.\n", "\n", @@ -2160,19 +2160,20 @@ " - Provide a custom semantic equivalence function for a specific object type\n", "\n", "#### The `weights` dictionary\n", - "In order to do any of the aforementioned (*optional*) custom comparisons, you will need to provide a `weights` dictionary as the last parameter to the [`semantically_equivalent()`](../api/stix2.environment.rst#stix2.environment.Environment.semantically_equivalent) method call. \n", + "In order to do any of the aforementioned (*optional*) custom comparisons, you will need to provide a `weights` dictionary as the last parameter to the [semantically_equivalent()](../api/stix2.environment.rst#stix2.environment.Environment.semantically_equivalent) method call. \n", "\n", "The weights dictionary should contain both the weight and the comparison function for each property. You may use the default weights and functions, or provide your own.\n", "\n", "##### Existing comparison functions\n", "For reference, here is a list of the comparison functions already built in the codebase (found in [stix2/environment.py](../api/stix2.environment.rst#stix2.environment.Environment)):\n", - " - [`custom_pattern_based`](../api/stix2.environment.rst#stix2.environment.custom_pattern_based)\n", - " - [`exact_match`](../api/stix2.environment.rst#stix2.environment.exact_match)\n", - " - [`partial_external_reference_based`](../api/stix2.environment.rst#stix2.environment.partial_external_reference_based)\n", - " - [`partial_list_based`](../api/stix2.environment.rst#stix2.environment.partial_list_based)\n", - " - [`partial_location_distance`](../api/stix2.environment.rst#stix2.environment.partial_location_distance)\n", - " - [`partial_string_based`](../api/stix2.environment.rst#stix2.environment.partial_string_based)\n", - " - [`partial_timestamp_based`](../api/stix2.environment.rst#stix2.environment.partial_timestamp_based)\n", + "\n", + " - [custom_pattern_based](../api/stix2.environment.rst#stix2.environment.custom_pattern_based)\n", + " - [exact_match](../api/stix2.environment.rst#stix2.environment.exact_match)\n", + " - [partial_external_reference_based](../api/stix2.environment.rst#stix2.environment.partial_external_reference_based)\n", + " - [partial_list_based](../api/stix2.environment.rst#stix2.environment.partial_list_based)\n", + " - [partial_location_distance](../api/stix2.environment.rst#stix2.environment.partial_location_distance)\n", + " - [partial_string_based](../api/stix2.environment.rst#stix2.environment.partial_string_based)\n", + " - [partial_timestamp_based](../api/stix2.environment.rst#stix2.environment.partial_timestamp_based)\n", "\n", "For instance, if we wanted to compare two of the `ThreatActor`s from before, but use our own weights, then we could do the following:" ] @@ -3049,7 +3050,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.3" + "version": "3.8.1" } }, "nbformat": 4,