<jupyter_start><jupyter_text>Create Vespa application packages> Python API to create application packages Our goal is to create the following `msmarco` schema using our python API, based on our [text search tutorial](https://docs.vespa.ai/documentation/tutorials/text-search.html). ```schema msmarco {    document msmarco {        field id type string {            indexing: attribute | summary        }        field title type string {            indexing: index | summary            index: enable-bm25        }        field body type string {            indexing: index | summary            index: enable-bm25        }    }    fieldset default {        fields: title, body    }    rank-profile default {        first-phase {            expression: nativeRank(title, body)        }    }    rank-profile bm25 inherits default {        first-phase {            expression: bm25(title) + bm25(body)        }    }}```  Schema API<jupyter_code>from vespa.package import Document, Field, Schema, FieldSet, RankProfile, ApplicationPackage

document = Document(
    fields=[
        Field(name = "id", type = "string", indexing = ["attribute", "summary"]),
        Field(name = "title", type = "string", indexing = ["index", "summary"], index = "enable-bm25"),
        Field(name = "body", type = "string", indexing = ["index", "summary"], index = "enable-bm25")        
    ]
)

msmarco_schema = Schema(
    name = "msmarco", 
    document = document, 
    fieldsets = [FieldSet(name = "default", fields = ["title", "body"])],
    rank_profiles = [RankProfile(name = "default", first_phase = "nativeRank(title, body)")]
)

app_package = ApplicationPackage(name = "msmarco", schema=msmarco_schema)<jupyter_output><empty_output><jupyter_text>Modify the application package We can add a new rank profile:<jupyter_code>app_package.schema.add_rank_profile(
    RankProfile(name = "bm25", inherits = "default", first_phase = "bm25(title) + bm25(body)")
)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12170385395537525, 'fraction_numerical': 0.010141987829614604, 'mean_word_length': 3.171247357293869, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '51350', 'license': 'Apache-2.0', 'n_tokens_mistral': 577, 'n_tokens_neox': 557, 'n_words': 155, 'path': 'python/vespa/docs/sphinx/source/application-package.ipynb', 'repo_name': 'srikanthnampelli/vespa', 'size': '1972'}