PisaToCiff

Struct PisaToCiff 

Source
pub struct PisaToCiff { /* private fields */ }
Expand description

PISA to CIFF converter.

Implementations§

Source§

impl PisaToCiff

Source

pub fn description<S: Into<String>>(&mut self, description: S) -> &mut Self

Sets CIFF index description.

Source

pub fn pisa_paths<P: AsRef<OsStr>>(&mut self, base_path: P) -> &mut Self

Sets PISA paths. Required.

Paths are constructed by appending file extensions to the base path:

  • .docs for document postings,
  • .freqs for frequency postings,
  • .sizes for document sizes,
  • .terms for terms text file,
  • .documents for document titles text file,
Source

pub fn index_paths<P: AsRef<OsStr>>(&mut self, base_path: P) -> &mut Self

Sets PISA (uncompressed) inverted index paths. Required.

Constructs paths using the given base path, appeding suffixes: .docs, .freqs, and .sizes.

Source

pub fn terms_path<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self

Sets the path of the term file (newline-delimited text format). Required.

Source

pub fn titles_path<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self

Sets the path of the document titles file (newline-delimited text format). Required.

Source

pub fn output_path<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self

Set the output file path. Required.

Source

pub fn convert(&self) -> Result<()>

Builds a CIFF index using the previously defined parameters.

§Errors

Error will be returned if:

  • some required parameters are not defined,
  • any I/O error occurs during reading input files or writing to the output file,
  • any input file is in an incorrect format.

Trait Implementations§

Source§

impl Clone for PisaToCiff

Source§

fn clone(&self) -> PisaToCiff

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PisaToCiff

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PisaToCiff

Source§

fn default() -> PisaToCiff

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V