# CobolSegmenter

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/parsers/language/cobol/CobolSegmenter)

Code segmenter for `COBOL`.

## Signature

```python
CobolSegmenter(
    self,
    code: str,
)
```

## Extends

- `CodeSegmenter`

## Constructors

```python
__init__(
    self,
    code: str,
)
```

| Name | Type |
|------|------|
| `code` | `str` |


## Properties

- `PARAGRAPH_PATTERN`
- `DIVISION_PATTERN`
- `SECTION_PATTERN`
- `source_lines`

## Methods

- [`is_valid()`](https://reference.langchain.com/python/langchain-community/document_loaders/parsers/language/cobol/CobolSegmenter/is_valid)
- [`extract_functions_classes()`](https://reference.langchain.com/python/langchain-community/document_loaders/parsers/language/cobol/CobolSegmenter/extract_functions_classes)
- [`simplify_code()`](https://reference.langchain.com/python/langchain-community/document_loaders/parsers/language/cobol/CobolSegmenter/simplify_code)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/document_loaders/parsers/language/cobol.py#L9)