> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LoadFromFile Method of the ExtractionModels Object

This method allows you to load an NLP model from a .zip file.

## Syntax

```vb Visual Basic .NET theme={null}
Function LoadFromFile( _
  Path As String, _
  Source As FieldDefinition, _
  Language As Language _
) As ExtractionModel
```

```cpp C++ theme={null}
HRESULT LoadFromFile(
  BSTR               Path,
  IFieldDefinition*  Source,
  ILanguage*         Language,
  IExtractionModel** Result
);
```

## Parameters

**Path**

\[in] The full path to the .zip file where the NLP model is stored.

**Source**

\[in] Refers to the [**FieldDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fielddefinition.md) object that specifies the field from which you want to extract the entity.

**Language**

\[in] Refers to the [**Language**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/language.md) object that specifies the language of the text to be extracted.

> [!NOTE]
>
> If you specify a language other than the language in which a model was trained, no fields will be recognized when using the model. In this case, you will need to change the language using the [**Language**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/extractionmodel.md#language) property of the [**ExtractionModel**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/extractionmodel.md) object.

**Result**

\[out, retval] A pointer to the [**IExtractionModel**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/extractionmodel.md)**\*** variable that receives the interface pointer for the loaded model.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**ExtractionModel**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/extractionmodel.md)

[**ExtractionModels**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/extractionmodels.md)
