File size: 389 Bytes
4a1df2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""
Greedy Search
=================
"""
from .beam_search import BeamSearch


class GreedySearch(BeamSearch):
    """A search method that greedily chooses from a list of possible
    perturbations.

    Implemented by calling ``BeamSearch`` with beam_width set to 1.
    """

    def __init__(self):
        super().__init__(beam_width=1)

    def extra_repr_keys(self):
        return []