---
name: "slmprune"
section: "1"
platform: "linux"
package: "sunpinyin"
version: "3.0.0rc2-3"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/slmprune"
---

# slmprune(1)

prune the back-off language model to a reasonable size

## NAME

slmprune - prune the back-off language model to a reasonable size

## SYNOPSIS

**slmprune** *input\_slm* *result\_slm* *cut\_option* *num*...

## DESCRIPTION

This program uses entropy-based method to prune the size of back-off  language model '*input\_slm*' to a specific size and write to '*result\_slm*'.

the third parameter *cut\_option* can be \[**R**\|**C**\]. It means the following numbers is the number for (**R**)eserve or (**C**)ut. If (**C**)ut, the num\[k\] means how many items in level K would be cut. If (**R**)eserve, num\[k\] means how many item would be reserved in level k.

Note that we do not ensure that during pruning process,  exactly the the given number of items are cut or reserved, because some items may  contains high level children, so could not be cut.

Also it's your responsibility to give right number of arguments based on 'input\_slm'.

## NOTE

To get information of the back-off language model, try '**slminfo**'.

## AUTHOR

Originally written by Phill.Zhang \<phill.zhang@sun.com\>. Currently maintained by Kov.Chai \<tchaikov@gmail.com\>.

## SEE ALSO

[**slminfo**(1)](/slminfo/1.md), [**slmthread**(1)](/slmthread/1.md).
